参考github上的一个gist

    1. (env)~/env pip install pycurl
    2. Downloading/unpacking pycurl
    3. Downloading pycurl-7.19.0.tar.gz (71Kb): 71Kb downloaded
    4. Running setup.py egg_info for package pycurl
    5. sh: curl-config: not found
    6. Traceback (most recent call last):
    7. File "<string>", line 14, in <module>
    8. File "/home/eric/env/build/pycurl/setup.py", line 90, in <module>
    9. raise Exception, ("`%s' not found -- please install the libcurl development files" % CURL_CONFIG)
    10. Exception: `curl-config' not found -- please install the libcurl development files
    11. Complete output from command python setup.py egg_info:
    12. sh: curl-config: not found
    13. Traceback (most recent call last):
    14. File "<string>", line 14, in <module>
    15. File "/home/eric/env/build/pycurl/setup.py", line 90, in <module>
    16. raise Exception, ("`%s' not found -- please install the libcurl development files" % CURL_CONFIG)
    17. Exception: `curl-config' not found -- please install the libcurl development files
    18. ----------------------------------------
    19. Command python setup.py egg_info failed with error code 1
    20. Storing complete log in /home/eric/.pip/pip.log
    21. (env)~/env apt-cache depends python-pycurl
    22. python-pycurl
    23. Depends: libc6
    24. Depends: libcurl3-gnutls
    25. Depends: libgcrypt11
    26. Depends: libgnutls26
    27. Depends: libgssapi-krb5-2
    28. Depends: libidn11
    29. Depends: libldap-2.4-2
    30. Depends: zlib1g
    31. Depends: python
    32. Depends: python
    33. Depends: python-support
    34. Suggests: libcurl4-gnutls-dev
    35. Suggests: python-pycurl-dbg
    36. Conflicts: <python2.3-pycurl>
    37. Conflicts: <python2.4-pycurl>
    38. Replaces: <python2.3-pycurl>
    39. Replaces: <python2.4-pycurl>
    40. (env)~/env
    41. (env)~/env sudo apt-get install libcurl4-gnutls-dev
    42. then ``pip install pycurl``

    解决方法

    Thanks for this gist!!!11 If somebody have additional problems with install with this error

    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/src/pycurl.o -L/usr/lib/x86_64-linux-gnu -lcurl -lidn -lgcrypt -llber -lldap -lrt -lgssapi_krb5 -lz -lgnutls -lgcrypt -lrtmp -lz -lgnutls -o build/lib.linux-x86_64-2.7/pycurl.so -Wl,-Bsymbolic-functions /usr/lib/x86_64-linux-gnu/libcurl.a -Wl,-Bsymbolic-functions

    /usr/bin/ld: cannot find -lrtmp

    Just install

    sudo apt-get install libcurl4-gnutls-dev librtmp-dev

    Why package needed? I don’t know -_- but it works