Occasionally I have to install new packages on servers. If I'm lucky, I can find an RPM, otherwise, I get to bang my head on the wall and attempt to compile a package.
This time I get to compile GnuPG to get version 2.1.15. So I download all the dependent libraries, run configure && make install, lastly I repeat for the gnupg-2.1.15 package itself, and all goes well, and make puts everything in /usr/local/ including libraries and binaries. Feeling lucky, I check the version:
$ /usr/local/bin/gpg2 --version
gpg: Fatal: libgcrypt is too old (need 1.7.0, have 1.6.6)
Oops. What happened, so I check the linked libraries:
$ ldd /usr/local/bin/gpg2
linux-vdso.so.1 (0x00007fff15db4000)
libgcrypt.so.20 => /lib64/libgcrypt.so.20 (0x00007fcab5431000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007fcab521d000)
libassuan.so.0 => /lib64/libassuan.so.0 (0x00007fcab5009000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcab4c47000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fcab4a43000)
/lib64/ld-linux-x86-64.so.2 (0x00005615f5c77000)
Ugh, the old built-in-system libraries have been linked. I don't compile software much, so I'm stuck here trying to figure out how to tell gcc via configure (or other?) to link the dependent libraries which were just installed in /usr/local/lib/
This is my configure command for gnupg-2.1.15:
./configure --prefix=/usr/local --with-libgpg-error-prefix=/usr/local/\
--with-libgcrypt-prefix=/usr/local --with-libassuan-prefix=/usr/local\
--with-ksba-prefix=/usr/local --with-npth-prefix=/usr/local
Running this on Fedora 24 with latest updates & kernel installed and gcc 6.2.1.
Thanks for taking the time to consider my issue.