“Could not run curl-config: [Errno 2] No such file or directory” when installing pycurl

谁说我不能喝 提交于 2019-11-28 15:45:13
Michael Rice

On Debian I needed the following packages to fix this

sudo apt install libcurl4-openssl-dev libssl-dev
eldos

Similarly with yum package manager

yum install libcurl-devel

If you use dnf, use

dnf install libcurl-devel

in my case this fixed the problem:

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

as explained here

In Alpine linux you should do:

apk add curl-dev python3-dev libressl-dev

I encountered the same problem whilst trying to get Shinken 2.0.3 to fire up on Ubuntu. Eventually I did a full uninstall then reinstalled Shinken with pip -v. As it cleaned up, it mentioned:

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

Installed that with apt-get, and all the brokers fired up as expected :-)

That solved my problem on Ubuntu 14.04:

apt-get install libcurl4-gnutls-dev

On OpenSUSE:

zypper in libcurl-devel 

In my case i kept getting the same error message. I use fedora. I solved it by doing:

sudo dnf install pycurl

This installed eveything that I needed for it to work.

I had this issue on Mac and it was related to the openssl package being an older version of what it was required by pycurl. pycurl can use other ssl libraries rather than openssl as per my understanding of it. Verify which ssl library you're using and update as it is very likely to fix the issue.

I fixed this by:

  • running brew upgrade
  • downloaded the latest pycurl-x.y.z.tar.gz from http://pycurl.io/
  • extracted the package above and change directory into it
  • ran python setup.py --with-openssl install as openssl is the library I have installed. If you're ssl library is either gnutls or nss then will have to use --with-gnutls or --with-nss accordingly. You'll be able to find more installation info in their github repository.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!