PDA

View Full Version : Installing gnupg



scritch
04-04-2006, 02:37 PM
I've managed to install gnupg, will post a tutorial separately. Here's the short version, covering installation on a virtual private server:

- Get the latest tarball from gnupg.org, place it in your home directory above the web root (e.g. in /usr/home) and unpack it.

- cd to the unpacked gnupg-x.x.x directory (e.g. gnupg-1.4.3). Follow the installation instructions found at gnupg.org, but with these modifications:

- The configure command to gnupg needs to be told explicitly where to find some files, because it will assume they're where they're not. So run configure like this, substituting your actual username for "yourusername":

./configure --prefix=/usr/home/yourusername --libdir=/usr/local/lib --includedir=/usr/local/phplibs/include/

- Assuming this doesn't report errors, run make and then run make install, as normal.

You should end up with a gpg executable installed in /usr/home/yourusername/bin

rolling
10-27-2006, 11:43 AM
For version 1.4.5 I needed


./configure --prefix=/usr/mylocal --libdir=/usr/local/lib --includedir=/usr/local/phplibs/include/ --with-libiconv-prefix=/usr/local/phplibs

I also modified keyserver/Makefile.am so that
gpgkeys_ldap_CPPFLAGS = @LDAP_CPPFLAGS@ $(gpgkeys_curl_CPPFLAGS) was at the end of the file. Note the addition of $(gpgkeys_curl_CPPFLAGS)

Once you have built GnuPG, you will need to create a few links as our directory is not in the PATH.

mkdir ~/.gnupg
cp -p /usr/mylocal/share/gnupg/options.skel ~/.gnupg/options
ln -s /usr/mylocal/bin/gpg /usr/local/bin/gpg

There might be a bit more work to do yet because I get the error

error while loading shared libraries: libcurl.so.3
when trying to connect to hkp server pgp.mit.edu

rolling
11-02-2006, 07:54 PM
Solved the libcurl.so.3 problem. It appears that the script used to install PHP from the Site Manager fails to update /etc/ld.so.cache. As a result, the make process finds licurl.so.3 in /usr/local/bin and builds this into the executable. However, when you try running the executable, there is no entry in /etc/ld.so.cache and so it fails.

To fix this, you need to run ldconfig -v from the prompt of your SSH session.

To check if you have this problem, use the command
ld config -p | grep libcurl

libcurl.so.3.0.0 (libc6) => /usr/local/lib/libcurl.so.3.0.0
libcurl.so.3 (libc6) => /usr/local/lib/libcurl.so.3
libcurl.so.2 (libc6) => /lib/libcurl.so.2
libcurl.so.1 (libc6) => /lib/libcurl.so.1
libcurl.so (libc6) => /lib/libcurl.so
libcurl.so (libc6) => /usr/local/lib/libcurl.so

Once I had fixed this, I tried a completely fresh install and all I needed was ./configure --prefix=/usr/mylocal during the build

x0d
01-27-2007, 09:08 PM
It took a few tries, but thanks to both of your suggestions, it worked.

step1: Install CURL via Control Panel
step2: $ ldconfig -v
step3: $ wget ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.6.tar.gz
step4: $ tar -zxf gnupg-1.4.6.tar.gz; cd gnupg-1.4.6
step5: $ ./configure --prefix=/usr/local/gnupg; make; make install;

That's about it.

use: './configure --prefix=/usr/local/gnupg --libdir=/usr/local/lib --includedir=/usr/local/phplibs/include/ --with-libiconv-prefix=/usr/local/phplibs' if step5 doesn't work. If that doesn't work, then reply.

Thanks!