下面是使用pip工具安装mod-wsgi时出现的错误。
root@localhost ~# pip3安装模块-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.发布于 2020-01-10 20:11:05
官方mod-wsgi install页面- https://pypi.org/project/mod-wsgi/中提供了系统需求详细信息
因为我的系统是centos7,所以我安装了下面的包来修复这个问题。
yum install httpd httpd-devel -yroot@localhost ~# pip3安装模块-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.0https://stackoverflow.com/questions/59681427
复制相似问题