1. ホーム
  2. パイソン

curl-config を実行できませんでした。[Errno 2] そのようなファイルまたはディレクトリがありません。

2022-03-01 16:31:24
<パス

クローラーを作成するための pycurl を debian にインストール。

root@debian:/# pip install pycurl --upgrade
Downloading/unpacking pycurl from https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.5.1.tar.gz#md5= f44cd54256d7a643ab7b16e3f409b26b
  Downloading pycurl-7.19.5.1.tar.gz (142kB): 142kB downloaded
  Running setup.py (path:/tmp/user/0/pip-build-2adbEK/pycurl/setup.py) egg_info for package pycurl
    Traceback (most recent call last):
      File "
"
, line 17, in <module>
      File "/tmp/user/0/pip-build-2adbEK/pycurl/setup.py", line 634, in <module>
        ext = get_extension(split_extension_source=split_extension_source)
      File "/tmp/user/0/pip-build-2adbEK/pycurl/setup.py", line 392, in get_extension
        ext_config = ExtensionConfiguration()
      File "/tmp/user/0/pip-build-2adbEK/pycurl/setup.py", line 65, in __init__
        self.configure()
      File "/tmp/user/0/pip-build-2adbEK/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 "
"
, line 17, in <module>


  File "/tmp/user/0/pip-build-2adbEK/pycurl/setup.py", line 634, in <module>


    ext = get_extension(split_extension_source=split_extension_source)


  File "/tmp/user/0/pip-build-2adbEK/pycurl/setup.py", line 392, in get_extension


    ext_config = ExtensionConfiguration()


  File "/tmp/user/0/pip-build-2adbEK/pycurl/setup.py", line 65, in __init__


    self.configure()


  File "/tmp/user/0/pip-build-2adbEK/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/user/0/pip-build-2adbEK/pycurl
Storing debug log for failure in /root/.pip/pip.log

以下のライブラリを再インストールします。

#apt-get install libcurl4-openssl-dev

セントス

#yum install libcurl-devel