1

I've just started using Manjaro Linux, but my pacman appears to have become messed up.

When I try to install any package, I get an error along the lines of this:

warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
error: lemonbar-xft: missing required signature
:: File /var/cache/pacman/pkg/lemonbar-xft-269.00a3fe6-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).

However, when I run sudo pacman-key --init it says:

gpg: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
chmod: cannot access '/etc/pacman.d/gnupg//trustdb.gpg': No such file or directory
gpg: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
gpg: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
==> Updating trust database...
gpg: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
==> ERROR: Trust database could not be updated.
2

Probably you have system in partially-upgraded state.

First of all, don't close your terminal since most probably bash won't work without readline.

Secondly, try to search for readline-7.0* in your /var/cache/pacman/pkg, or download old package from arch linux archive. You will need to extract readline and install missing .so file yourself.

Read more about similar issue here: gnupg on Arch Linux broken since readline upgrade - can't find libreadline.so.6

  • I tried to install readline-8.0.tar.gz, but I get the same error: awk: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory config.status: error: could not create Makefile when trying to do ./configure – ngmh Mar 5 at 13:21
  • 1
    You need to download readline-7.0, probably the latest version, from package cache or from archive link. Than you need to unpack the package and copy libreadline.so.7 file to /usr/lib using sudo. Please read the instructions in the answer that I referenced. – php_beggar Mar 5 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.