3

after the upgrade to yakkety I cannot safe update or upgrade the system. The output of apt update (and aptitude and synaptic etc) is always the same:

GPG error: http://01.archive.ubuntu.com/ubuntu yakkety-updates InRelease: Unknown error executing apt-key

the execution of apt-key update give me:

gpg: Fatal: libgcrypt is too old (need 1.7.0, have 1.6.5)

Quite strange...I tried to install manually libgcrypt20 and still the output is the same...

so I checked with dpkg -p libgcrypt20 that gives me:

dpkg-query: package 'libgcrypt20' is not available

But according to synaptic the version 1.7.2-2ubuntu1 is installed...

I already tried ldconfig.

I cannot update in not safe mode because I am in a non democratic country, and I am afraid for my system.

Thks. c.

2 Answers 2

4

I experienced an error very similar to this. In my case, I had another version of libgcrypt installed in /usr/local/lib

user@computer:~$ gpg --version
gpg: Fatal: libgcrypt is too old (need 1.7.0, have 1.6.4)
user@computer:~$ sudo ldd /usr/bin/gpg
    linux-vdso.so.1 =>  (0x00007fff5b3b8000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4f1f95d000)
    libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f4f1f74d000)
    libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f4f1f44b000)
    libgcrypt.so.20 => /usr/local/lib/libgcrypt.so.20 (0x00007f4f1f169000)
    libreadline.so.7 => /lib/x86_64-linux-gnu/libreadline.so.7 (0x00007f4f1ef1f000)
    libassuan.so.0 => /usr/local/lib/libassuan.so.0 (0x00007f4f1ed0a000)
    libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x00007f4f1eaf6000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4f1e72f000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4f1e426000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4f1e208000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4f1e004000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f4f1ddd9000)
    /lib64/ld-linux-x86-64.so.2 (0x0000564feff78000)
user@computer:~$ ls /usr/local/lib
libassuan.la        libgcrypt.so         libgpg-error.so.0       libksba.so.8.11.4
libassuan.so        libgcrypt.so.20      libgpg-error.so.0.17.0  libnpth.la
libassuan.so.0      libgcrypt.so.20.0.4  libksba.la              libnpth.so
libassuan.so.0.7.2  libgpg-error.la      libksba.so              libnpth.so.0
libgcrypt.la        libgpg-error.so      libksba.so.8            libnpth.so.0.0.5

I solved this problem by uninstalling the version of gnupg that I had previously manually installed

./configure
make
make uninstall
5
  • Mmm, in my case I don' have that: ls /usr/local/lib libgcrypt.la libgcrypt.so libgcrypt.so.20 libgcrypt.so.20.0.5 any advice? Apr 1, 2017 at 16:45
  • I am guessing that your system has links to at least some of these alternate libraries in /usr/local/lib. The command sudo ldd /usr/bin/gpg will show you the current links. You should be able to move or rename each of the offending files in /usr/local/lib (as a backup) and then use the command sudo ldconfig to re-establish the links to the system defaults.
    – nhoj
    Apr 13, 2017 at 20:41
  • 2
    This actually solved my update problems from 16.10 to 17.04 after incolpete dist upgrade. I had to remove all lidgcrypt files from /usr/local/lib run sudo ldconfig /usr/bin/gpg and finally got it working again.
    – bloodworks
    Apr 16, 2017 at 13:41
  • It worked!!! Thank you guys, please rewrite it in form of reply and I will vote the answer. Apr 20, 2017 at 17:53
  • 1
    Considering the same issue of libcrypt, just needed to run sudo ldconfig /usr/bin/gpg without remove files from /usr/local/lib
    – manasouza
    Mar 27, 2019 at 13:31
0

Running the following seemed to work for me. Thanks to the comments from above.

Find out where gpg is hiding

$ which gpg
> /usr/local/bin/gpg

Fix'r Up

Point at the path from which gpg and run ldconfig on it.

$ sudo ldconfig /usr/local/bin/gpg

Note: ldconfig didn't return anything, it just started working afterwards.

Verify

$ gpg --version
> gpg (GnuPG) 2.2.17
> libgcrypt 1.8.4
> ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .