0

I am trying to register a Key with gpg to upgrade my debian system with aptitude. System is Debian 4.0 32bit.

Unfortunately I am getting an error. This is waht I try:

gpg --keyserver pgp.mit.edu --recv-keys [KEY]

The error:

error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
gpg: requesting key 473041FA from hkp server pgp.mit.edu
gpg: no handler for keyserver scheme `hkp'
gpg: keyserver receive failed: keyserver error

Searching for libcurl.so.4 this is what I find:

/src/curl/curl-7.16.4/lib/.libs/libcurl.so.4
/src/curl/curl-7.16.4/lib/.libs/libcurl.so.4.0.0
/usr/local/lib/libcurl.so.4
/usr/local/lib/libcurl.so.4.0.0

Edit:

The /etc/ld.so.conf has only one entry:

include /etc/ld.so.conf.d/*.conf


ls -la /usr/local/lib/libcurl*

returns

-rw-r--r-- 1 root staff 5231754 2007-07-19 21:46 /usr/local/lib/libcurl.a
-rwxr-xr-x 1 root staff     828 2007-07-19 21:46 /usr/local/lib/libcurl.la
lrwxrwxrwx 1 root staff      16 2007-07-19 21:46 /usr/local/lib/libcurl.so -> libcurl.so.4.0.0
lrwxrwxrwx 1 root staff      16 2007-07-19 21:46 /usr/local/lib/libcurl.so.4 -> libcurl.so.4.0.0
-rwxr-xr-x 1 root staff 2512584 2007-07-19 21:46 /usr/local/lib/libcurl.so.4.0.0
Kenny Rasschaert
  • 9,045
  • 3
  • 42
  • 58
Thomas
  • 3
  • 2
  • 1
    What is the output of `ls -la /usr/local/lib/libcurl*`? Is `/usr/local/lib/` defined in your `/etc/ld.so.conf`? – Tim Dec 29 '11 at 16:01
  • I posted the results in the original question. – Thomas Dec 29 '11 at 16:13
  • I am doubting that `/usr/local/lib` is defined in `/etc/ld.so.conf.d/` – Tim Dec 29 '11 at 16:21
  • You can try overriding the default library path `LD_LIBRARY_PATH=/usr/local/lib/ gpg --keyserver pgp.mit.edu --recv-keys [KEY]` – Tim Dec 29 '11 at 16:23
  • You should have `/usr/bin/gpg` and the libraries it needs in `/usr/lib` or `/lib`. Debian 4 (etch) is rather out-of-date; you should upgrade through lenny (5.0) to squeeze (6.0). It looks like you have additional partially-broken installations of some software; you should remove them from your `$PATH` while you perform the upgrade. – Gilles 'SO- stop being evil' Dec 29 '11 at 16:31
  • @Tim: That workaround helped for the moment. Thanks a lot! – Thomas Dec 29 '11 at 16:39

2 Answers2

1

You have conflicting versions of libcurl installed. This usually happens when you do a manual compilation of curl and get a libcurl form there while apt will download another libcurl form repository since it is not aware of manual compilation.
To solve this, you need to get rid of one of the libcurl. Either uninstall via apt or remove the path of the source compiled libcurl from all the environmental variables.

Aditya Patawari
  • 1,065
  • 10
  • 23
  • Thanks for your feedback. I removed the the apt-version but still get the error. – Thomas Dec 29 '11 at 16:12
  • Please tell me that you used apt-get remove or purge and did not manually delete it. Also run `echo $PATH` and paste the output in your question. – Aditya Patawari Dec 29 '11 at 16:25
  • I used aptitude remove and also uninstalled the compiled version. Afterward I reinstalled the package "libcurl3" via aptitude. `echo $PATH` delivers `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11` – Thomas Dec 29 '11 at 16:28
0

What is that /src folder? What is that lib in /usr/local?

Seems like this install is seriously screwed up.

So the easiest option seems to be: if you already want to upgrade your system do a clean install with squeeze or wheezy. Do not mix libraries installed by hand and installed by the package manager.

Another way can be to fix your install with aptitude. This one is hard to tell.

Make sure that you sources.list contains the correct entries, upgrade your system or reinstall packages if necessary.


As far as I recall pgp.mit.edu is not recommended use x-hkp://sks.pkqs.net instead. Look http://sks.pkqs.net:11371/

cstamas
  • 6,707
  • 25
  • 42