欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

Linux下遇到PyCurl的错误解决方法

程序员文章站 2022-12-07 13:09:54
could not run curl-config 的解决方式downloading/unpacking pycurl (from pyspider) downloading pycurl-7.19....

could not run curl-config 的解决方式

downloading/unpacking pycurl (from pyspider)
 downloading pycurl-7.19.5.1.tar.gz (142kb): 142kb downloaded
 running setup.py (path:/tmp/pip-build-dubgj5/pycurl/setup.py) egg_info for package pycurl
  traceback (most recent call last):
   file "<string>", line 17, in <module>
   file "/tmp/pip-build-dubgj5/pycurl/setup.py", line 634, in <module>
    ext = get_extension(split_extension_source=split_extension_source)
   file "/tmp/pip-build-dubgj5/pycurl/setup.py", line 392, in get_extension
    ext_config = extensionconfiguration()
   file "/tmp/pip-build-dubgj5/pycurl/setup.py", line 65, in __init__
    self.configure()
   file "/tmp/pip-build-dubgj5/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 17, in <module>

 file "/tmp/pip-build-dubgj5/pycurl/setup.py", line 634, in <module>

  ext = get_extension(split_extension_source=split_extension_source)

 file "/tmp/pip-build-dubgj5/pycurl/setup.py", line 392, in get_extension

  ext_config = extensionconfiguration()

 file "/tmp/pip-build-dubgj5/pycurl/setup.py", line 65, in __init__

  self.configure()

 file "/tmp/pip-build-dubgj5/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

----------------------------------------
cleaning up...
command python setup.py egg_info failed with error code 1 in /tmp/pip-build-dubgj5/pycurl
storing debug log for failure in /root/.pip/pip.log

在安装 pyspider 的时候我就遇到了这个问题, pyspider 依赖 pycurl 这个库,而 pycurl 要求系统中存在相对应的库。

经过我的测试, curl 是正确安装了的,但是却依然提示了找不到 curl-config 的问题

解决方案:

apt-get install libcurl4-gnutls-dev

运行安装后即可正常安装 pycurl 。

以上就是linux下遇到pycurl的错误解决方法的详细内容,更多关于linux下遇到pycurl的错误总结的资料请关注其它相关文章!

相关标签: Linux PyCurl