3

I'm running a Gentoo Linux system under which I've never had problems installing anything into my virtualenv using pip. I've managed installing PIL and django, but for some reason, pycurl (a dependency of cloudkey) is flipping out, claiming that I don't have libcurl.a (note that it's not .la) on my system.

curl is installed. In fact, pycurl is installed on the host system just fine, but it just won't install into my virtualenv. Here's the output:

$ pip install cloudkey
Requirement already satisfied (use --upgrade to upgrade): cloudkey in /path/to/virtualenv/lib/python2.6/site-packages
Requirement already satisfied (use --upgrade to upgrade): distribute in /path/to/virtualenv/lib/python2.6/site-packages (from cloudkey)
Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.0.9 in /path/to/virtualenv/lib/python2.6/site-packages (from cloudkey)
Downloading/unpacking pycurl>=7.19.0 (from cloudkey)
  Downloading pycurl-7.19.0.tar.gz (71Kb): 71Kb downloaded
  Running setup.py egg_info for package pycurl
Using curl-config (libcurl 7.23.1)
Installing collected packages: pycurl
  Running setup.py install for pycurl
Using curl-config (libcurl 7.23.1)
building 'pycurl' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.6 -c src/pycurl.c -o build/temp.linux-x86_64-2.6/src/pycurl.o
x86_64-pc-linux-gnu-gcc -pthread -shared build/temp.linux-x86_64-2.6/src/pycurl.o -L/usr/lib64 -lcurl -lssl -lcrypto -lldap -lrt -lssl -lcrypto -lz -lssl -lcrypto -lldap -lrt -lssl -lcrypto -lz -lpython2.6 -o build/lib.linux-x86_64-2.6/pycurl.so /usr/lib64/libcurl.a -Wl,-O1 -Wl,--as-needed
x86_64-pc-linux-gnu-gcc: /usr/lib64/libcurl.a: No such file or directory
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
Complete output from command /path/to/virtualenv/bin/python2.6 -c "import setuptools;__file__='/path/to/virtualenv/build/pycurl/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-kkwDnf-record/install-record.txt --install-headers /path/to/virtualenv/include/site/python2.6:
Using curl-config (libcurl 7.23.1)

running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.6

creating build/lib.linux-x86_64-2.6/curl

copying python/curl/__init__.py -> build/lib.linux-x86_64-2.6/curl

running build_ext

building 'pycurl' extension

creating build/temp.linux-x86_64-2.6

creating build/temp.linux-x86_64-2.6/src

x86_64-pc-linux-gnu-gcc -pthread -fPIC -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.6 -c src/pycurl.c -o build/temp.linux-x86_64-2.6/src/pycurl.o

x86_64-pc-linux-gnu-gcc -pthread -shared build/temp.linux-x86_64-2.6/src/pycurl.o -L/usr/lib64 -lcurl -lssl -lcrypto -lldap -lrt -lssl -lcrypto -lz -lssl -lcrypto -lldap -lrt -lssl -lcrypto -lz -lpython2.6 -o build/lib.linux-x86_64-2.6/pycurl.so /usr/lib64/libcurl.a -Wl,-O1 -Wl,--as-needed

x86_64-pc-linux-gnu-gcc: /usr/lib64/libcurl.a: No such file or directory

error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command /path/to/virtualenv/bin/python2.6 -c "import setuptools;__file__='/path/to/virtualenv/build/pycurl/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-kkwDnf-record/install-record.txt --install-headers /path/to/virtualenv/include/site/python2.6 failed with error code 1
Storing complete log in /home/daniel/.pip/pip.log

Any ideas/suggestions?

Daniel Quinn
  • 635
  • 2
  • 9
  • 15

1 Answers1

3

Since you mentioned you were using Gentoo, you may want to use portage to find out what package owns that file. You can use equery (emerge gentoolkit) to figure out what package owns it:

equery belongs /usr/lib64/libcurl.a
Andrew M.
  • 11,182
  • 2
  • 35
  • 29
  • That's the kooky part! Running that command returns 0 results. The file isn't on the filesystem and even re-emerging pycurl into the host OS doesn't make it reappear. It's as if pycurl requires a file that isn't part of libcurl anymore. – Daniel Quinn Dec 16 '11 at 22:45
  • You know, I ran the same command on Ubuntu--that file appeared in libcurl4, but not libcurl3 (which was what was installed). I wonder if this appears in a newer version of curl? – Andrew M. Dec 17 '11 at 03:45
  • I figured it out! `libcurl` had to be installed with `USE="static-libs"` (not the default). Once that was done, the aforementioned `equery` command returned a valid result and I could run `pip install pycurl` in my virtualenv. – Daniel Quinn Dec 19 '11 at 08:22
  • Awesome! Good work Daniel – Will Oct 19 '12 at 19:38