I'm trying to compile gnupg-2.1.0 for Debian Wheezy, I've downloaded and compiled the required libraries (libgpg-error-1.17
, libgcrypt-1.6.2
, libksba-1.3.2
, libassuan-2.1.3
, and pth-2.0.7
in that order) via ./configure
, make
, make install
. I then added /usr/local/lib
to /etc/ld.so.conf
and then ran ldconfig
so that gnupg could find the libraries.
Gpupg compiles fine but upon attempting to run either ./agent/gpg-agent
or ./g10/g
I am greated with this error:
alpha@virtual:~/gnupg-2.1.0$ ./agent/gpg-agent --version
./agent/gpg-agent: /lib/i386-linux-gnu/libgpg-error.so.0: no version information available (required by ./agent/gpg-agent)
./agent/gpg-agent: /lib/i386-linux-gnu/libgpg-error.so.0: no version information available (required by /usr/local/lib/libgcrypt.so.20)
./agent/gpg-agent: relocation error: ./agent/gpg-agent: symbol gpgrt_set_alloc_func, version GPG_ERROR_1.0 not defined in file libgpg-error.so.0 with link time reference
ldd ./agent/gpg-agent
produces
root@virtual:/home/alpha/gnupg-2.1.0# ldd ./agent/gpg-agent
./agent/gpg-agent: /lib/i386-linux-gnu/libgpg-error.so.0: no version information available (required by ./agent/gpg-agent)
./agent/gpg-agent: /lib/i386-linux-gnu/libgpg-error.so.0: no version information available (required by /usr/local/lib/libgcrypt.so.20)
linux-gate.so.1 => (0xb7750000)
libgcrypt.so.20 => /usr/local/lib/libgcrypt.so.20 (0xb7698000)
libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xb7694000)
libassuan.so.0 => /usr/lib/i386-linux-gnu/libassuan.so.0 (0xb7681000)
libnpth.so.0 => /usr/local/lib/libnpth.so.0 (0xb767d000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb7664000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb74ff000)
librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb74f6000)
/lib/ld-linux.so.2 (0xb7751000)
Why is this error occuring and how could I fix it?
Resolution
Resolved by adding /usr/local/lib to LD_LIBRARY_PATH via export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
and echo /usr/local/lib > /etc/ld.so.conf.d/local.conf