A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label packages. Show all posts
Showing posts with label packages. Show all posts

All the homebrew packages I've installed on Mac OSX

I've used `brew install ....` many times, but now I'm regretting it because:

  • `brew update` takes so incredibly long to run, and downloads lots of unnecessary git history
  • `/usr/local/Cellar` is 3.8Gb big and I'm short on disk space
List of brew installed apps, in date order:
  • redis@4.0
  • watch
  • tree
  • dnsmasq
  • libunistring
  • libxmlsec1
  • xmlsec1
  • ack
  • putty
  • cmatrix
  • the_silver_searcher
  • ag
  • youtube-dl
  • elasticsearch@6.7
  • vbindiff
  • libpng
  • ilmbase
  • oniguruma
  • jq
  • telnet
  • gifsicle
  • fontconfig
  • tidy-html5
  • minio
  • gcc@4.9
  • autoenv # bugged: breaks "cd -"
  • direnv
  • maven@3.6
  • htop-osx
  • htop
  • xvid
  • npm
  • node@14
  • lsd
  • id3v2
  • nghttp2
  • gnutls
  • sphinx-doc
  • protobuf@3.17
  • markdown
  • postgres@13
  • ruby
  • httrack
  • chafa
  • wget
  • python@3.7
  • python2
  • coreutils
  • ctags-exuberant
  • ctags

Code works on one environment but not another

What can differ between environments? Check the following:

* Your code (obviously)
* Versions of other dependent packages - both in-house and third-party
* Versions of other installed in-house modules
* Versions of other Perl CPAN modules
* Processes which didn't die when you restarted the app
* Data in the database
* Number of rows in tables, i.e. is some limit being hit?
* Schema of the database
* Browser cache
* Server side web cache
* Files on disk, e.g. cached print documents

(source: a decade's experience building software)

Query installed packages on Ubuntu

Ubuntu uses debian packages, not RPMs so yum isn't relevant.

List all packages:
dpkg-query -l

Display summary info for a package:
dpkg-query -s package_name

Display files installed by a package:
dpkg-query -L package_name

When Thunderbird's calendar broke

Events weren't displayed properly in Thunderbird email client and its Lightning calendar plugin, for two weeks. There were complaints.

To fix it, manually download a previous version of Thunderbird (24.0) and its associated old version of Lightning (2.6).

(Missing step here regarding how to have Synaptic recognise an old version of Thunderbird. Disabling upgrade in Synaptic may not be necessary if Thunderbird is run outside of any package manager)

Then fix them both so they don't upgrade automatically:

  • Use Synaptic package manager to find Thunderbird, the click the 'Package' menu and select 'Lock Version'.
  • For Lightning, go to Add-ons, Extensions, right-click Lightning and 'Show more information', then switch off 'Automatic Updates'.

After a while, the developers will probably fix it. After that happens, you can unlock the packages and upgrade again.

It's times like this that make me appreciate Microsoft Outlook :(

Working with RPMs

Use -q to query:
    rpm -qi package_name # display info about the specified package
    rpm -ql package_name # list all the files in the specified package
    rpm -qa # list all installed packages

Add -p if you're querying an RPM file, omit it if you're querying an installed package.

How to install CPAN Perl modules on Ubuntu using apt-get package manager

script:

PACKAGE=$(echo "$1" | perl -e '$x=<>; chomp($x); $x=~s/::/-/g; $x=lc($x); print "lib$x-perl"')
sudo apt-get install $PACKAGE

Thanks

Fix debian/ubuntu gpg error when updating package sources


When updating the Debian based system, apt-get may display an error message like:

W: GPG error: ftp://ftp.debian.org/ testing Release:       
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F      

W: There is no public key available for the following key IDs:      
010908312D230C5F

The same problem in Synaptic package manager appears as:

W: Failed to fetch http://http.us.debian.org/debian/dists/sid/InRelease  
W: Failed to fetch http://http.us.debian.org/debian/dists/sid/Release.gpg

Unable to connect to http.us.debian.org:http: [IP: 128.30.2.36 80]

This is a feature of the apt-get system that guarantees the authenticity of servers for updating Debian.

Simply type the following commands, taking care to replace the number below with that of the key that was displayed in the error message:
gpg --keyserver pgpkeys.mit.edu --recv-key  010908312D230C5F      
gpg -a --export 010908312D230C5F | sudo apt-key add -

Copy+pasted from here