django - 无法安装 mod_wsgi 包
问题描述
我正在尝试在 amazon linux 2 实例中使用 pip 安装 mod_wsgi 包,但我一直面临错误:
命令:
python3 -m pip install mod_wsgi
输出/错误:
Defaulting to user installation because normal site-packages is not writeable
Collecting mod_wsgi
Using cached mod_wsgi-4.9.0.tar.gz (497 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2sfljsxd/mod-wsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2sfljsxd/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-pip-egg-info-54w0mlq7
cwd: /tmp/pip-install-2sfljsxd/mod-wsgi/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-2sfljsxd/mod-wsgi/setup.py", line 91, 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.我尝试运行python setup.py egg_info,但不断收到错误setup.py不存在
2.我尝试setup.py
使用命令查找,find . -name setup.py
但没有返回任何内容
我该如何解决这个问题?
PS:我知道你一次只应该问一个问题,但是,如果有任何教程解释如何使用 apache 和 mod_wsgi ,在 aws 上的 ec2 实例上启动一个 django 项目,请链接它,将不胜感激它
谢谢!
解决方案
推荐阅读
- javascript - 如何在 JavaScript 中使用正则表达式搜索文件中的特殊字符串?
- python - 具有唯一字符的Python字符串?无效的语法
- php - BotMan 和 Symfony 5.1 - 在子目录中安装 botman
- ssl - 为 LetsEncrypt 创建超链接以在 Github 页面上提供 SSL 证书
- dialogflow-es - DialogFlow 训练短语
- html - HTML 截断部分
- android - 如何在firebase中获取具有特定属性值的文档列表?
- ios - 在 Swift 5 中使用范围创建结构数组时,“表达式类型不明确,没有更多上下文”
- swift - 如何在 SwiftUI 中创建带有外部对焦环的 macOS Big Sur 风格的搜索框?
- python - 在熊猫中,如何重新排列数据框以同时组合列组?