“无法运行curl-config:安装pycurl时没有这样的文件或目录”

我试图通过安装pycurl

sudo pip install pycurl 

它下载得很好,但是当它运行setup.py时,我得到以下回溯:

 Downloading/unpacking pycurl Running setup.py egg_info for package pycurl Traceback (most recent call last): File "<string>", line 16, in <module> File "/tmp/pip-build-root/pycurl/setup.py", line 563, in <module> ext = get_extension() File "/tmp/pip-build-root/pycurl/setup.py", line 368, in get_extension ext_config = ExtensionConfiguration() File "/tmp/pip-build-root/pycurl/setup.py", line 65, in __init__ self.configure() File "/tmp/pip-build-root/pycurl/setup.py", line 100, in configure_unix raise ConfigurationError(msg) __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 16, in <module> File "/tmp/pip-build-root/pycurl/setup.py", line 563, in <module> ext = get_extension() File "/tmp/pip-build-root/pycurl/setup.py", line 368, in get_extension ext_config = ExtensionConfiguration() File "/tmp/pip-build-root/pycurl/setup.py", line 65, in __init__ self.configure() File "/tmp/pip-build-root/pycurl/setup.py", line 100, in configure_unix raise ConfigurationError(msg) __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory 

任何想法为什么发生这种情况,以及如何解决这个问题

6 Solutions collect form web for ““无法运行curl-config:安装pycurl时没有这样的文件或目录””

在Debian上,我需要下面的包来解决这个问题。

sudo apt-get install libcurl4-openssl-dev

yum包pipe理器类似

 yum install libcurl-devel 

在我的情况下,这解决了这个问题:

 sudo apt-get install libssl-dev libcurl4-openssl-dev python-dev 

如这里所解释的

这解决了我在Ubuntu 14.04上的问题:

apt-get install libcurl4-gnutls-dev

我在尝试让Shinken 2.0.3在Ubuntu上启动时遇到了同样的问题。 最后我做了一个完整的卸载,然后用pip -v重新安装Shinken。 清理之后,它提到:

Warning: missing python-pycurl lib, you MUST install it before launch the shinken daemons

apt-get安装,所有的经纪人按预期启动:-)

在OpenSUSE上:

 zypper in libcurl-devel 
  • Python从文件读取并保存到UTF-8
  • 为什么append在这段代码中没有返回?
  • 用Scipy(Python)拟合经验分布与理论分布?
  • 我如何编写一个返回另一个函数的函数?
  • 从GIT回购分支安装PIP
  • 将基类转换为派生类python(或扩展类的更多pythonic方法)
  • 短(和有用的)python片段
  • 从子文件夹导入模块
  • 如何使用sqlalchemy高效地pipe理频繁的模式更改?
  • Python:MySQLdb和“Library not loaded:libmysqlclient.16.dylib”
  • 编译Python到机器代码是否可行?