Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 --recv-keys [KEY]

The error:

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

Searching for this is what I find:



The /etc/ has only one entry:

include /etc/*.conf

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


-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/
lrwxrwxrwx 1 root staff      16 2007-07-19 21:46 /usr/local/lib/ ->
lrwxrwxrwx 1 root staff      16 2007-07-19 21:46 /usr/local/lib/ ->
-rwxr-xr-x 1 root staff 2512584 2007-07-19 21:46 /usr/local/lib/
share|improve this question
What is the output of ls -la /usr/local/lib/libcurl*? Is /usr/local/lib/ defined in your /etc/ – 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/ – Tim Dec 29 '11 at 16:21
You can try overriding the default library path LD_LIBRARY_PATH=/usr/local/lib/ gpg --keyserver --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 Dec 29 '11 at 16:31
up vote 0 down vote accepted

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 is not recommended use x-hkp:// instead. Look

share|improve this answer
I used Tims workaround. Thanks for your input! I used the server you recommended. – Thomas Dec 29 '11 at 16:41

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.

share|improve this answer
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
I used Tims workaround. Thanks for your input! – Thomas Dec 29 '11 at 16:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.