gnupg on Arch Linux broken since readline upgrade - can't find libreadline.so.6

This has been reported to Arch here.

The workaround is to run

mkinitcpio -P

after the upgrade has completed, but before rebooting.

If you've rebooted before re-running mkinitcpio, then you'll need to boot off e.g. a USB key and run the mkinitcpio from the chroot. The easiest is to use arch-chroot as in the Arch install instructions.

I haven't had a chance to test this method in this particular case, however have done so in the past.


Fixed by manually verifying and installing an older version:

  1. Download the previous release from Arch Linux Archive
  2. Copy the package and signature file to another machine and verifying the signature there
  3. Unpack the package: sudo tar -xvpf readline-6.3.008-4-x86_64.pkg.tar.xz -C / --exclude .PKGINFO --exclude .INSTALL

Warning: Other packages may contain pre- or post-install scripts. This one did not, but consider yourself warned!


It seems libreadline.so.7 is backward compatible enough for most utilities to keep working after running:

sudo ln -s /usr/lib/libreadline.so.7 /usr/lib/libreadline.so.6

After that it warned me that /usr/bin/bash: Symbol rl_readline_state has different size in shared object, consider re-linking, but I was able to update pacman-key and upgrade libgcrypt so that new packages would validate, and then pacman -S bash to rebuild my shell using readline 7.0.

After you've put out pacman's Catch-22-style fires, simply clean up with:

sudo rm /usr/lib/libreadline.so.6