Установка mod-wsgi в centos7 с помощью бросков pip3 «ОШИБКА: Команда завершилась ошибкой с состоянием выхода 1» - PullRequest
0 голосов
/ 10 января 2020

Ниже приведена ошибка при установке mod-wsgi с помощью инструмента pip.

[root@localhost ~] # pip3 install mod-wsgi

Collecting mod-wsgi   Downloading https://files.pythonhosted.org/packages/a0/8b/34dd82c3e15a031e9c89f5a5d2ca527ec35b7a01e1e7530abb61ffdb4d60/mod_wsgi-4.7.0.tar.gz (497kB)
     |████████████████████████████████| 501kB 111kB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-72ufrkfx/mod-wsgi/setup.py'"'"';
__file__='"'"'/tmp/pip-install-72ufrkfx/mod-wsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-72ufrkfx/mod-wsgi/pip-egg-info
         cwd: /tmp/pip-install-72ufrkfx/mod-wsgi/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-72ufrkfx/mod-wsgi/setup.py", line 168, in <module>
        'missing Apache httpd server packages.' % APXS)
    RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
    ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

1 Ответ

0 голосов
/ 10 января 2020

Подробная информация о системных требованиях приведена на официальной странице установки mod-wsgi - https://pypi.org/project/mod-wsgi/

Поскольку моя система установлена ​​на centos7, я устанавливаю нижеуказанные пакеты для исправления проблемы.

yum install httpd httpd-devel -y

[root@localhost ~] # pip3 install mod-wsgi

Collecting mod-wsgi
  Using cached https://files.pythonhosted.org/packages/a0/8b/34dd82c3e15a031e9c89f5a5d2ca527ec35b7a01e1e7530abb61ffdb4d60/mod_wsgi-4.7.0.tar.gz
Installing collected packages: mod-wsgi
    Running setup.py install for mod-wsgi ... done
Successfully installed mod-wsgi-4.7.0
...