Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
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 Dec 29 '11 at 16:31

2 Answers 2

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 pgp.mit.edu is not recommended use x-hkp://sks.pkqs.net instead. Look http://sks.pkqs.net:11371/

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

 
discard

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.