首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过pip3在centos7中安装mod-wsgi会抛出“错误:命令错误,退出状态为1”

通过pip3在centos7中安装mod-wsgi会抛出“错误:命令错误,退出状态为1”
EN

Stack Overflow用户
提问于 2020-01-10 20:11:05
回答 1查看 1.2K关注 0票数 1

下面是使用pip工具安装mod-wsgi时出现的错误。

root@localhost ~# pip3安装模块-wsgi

代码语言:javascript
复制
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.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-01-10 20:11:05

官方mod-wsgi install页面- https://pypi.org/project/mod-wsgi/中提供了系统需求详细信息

因为我的系统是centos7,所以我安装了下面的包来修复这个问题。

代码语言:javascript
复制
yum install httpd httpd-devel -y

root@localhost ~# pip3安装模块-wsgi

代码语言:javascript
复制
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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59681427

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档