【问题标题】:Running setup.py install for mod-wsgi-packages: finished with status 'error'为 mod-wsgi-packages 运行 setup.py install:完成状态为“错误”
【发布时间】:2019-01-05 01:05:07
【问题描述】:

当我尝试在 heroku 上部署我的 python 应用程序时,我在下面收到此错误。这里附上我的 requirements.txt 文件。

certifi==2018.11.29
cfe==0.0.15
chardet==3.0.4
Cython==0.29.2
dj-database-url==0.5.0
Django==2.1.2
gitdb2==2.0.5
GitPython==2.1.11
gunicorn==19.9.0
idna==2.8
libsass==0.16.1
mod-wsgi==4.6.5
numpy==1.15.4
olefile==0.46
Pillow==5.3.0
pipenv==2018.11.26
psycopg2==2.7.6.1
pystan==2.18.0.0
pytz==2018.7
requests==2.21.0
setuptools==40.5.0
six==1.12.0
smmap2==2.0.5
urllib3==1.24.1
virtualenv==16.2.0
virtualenv-clone==0.4.0
wheel==0.32.2

错误信息:

远程:为 mod-wsgi-packages 运行 setup.py 安装:已启动 远程:为 mod-wsgi-packages 运行 setup.py 安装:完成状态 远程:添加包/apr/build-1/mkdir.sh 远程:添加包/apr/build-1/libtool 远程:添加包/apr/build-1/make_exports.awk 远程:添加包/apr/build-1/apr_rules.mk 远程:添加包/apr/build-1/make_var_export.awk . . . . 远程:/usr/bin/ld:最终链接失败:错误值 远程:收集 2:错误:ld 返回 1 退出状态 远程:错误:命令“gcc”失败,退出状态为 1 偏僻的: 偏僻的: - - - - - - - - - - - - - - - - - - - - 远程:命令“/app/.heroku/python/bin/python -u -c”导入 setuptools, tokenize;file='/tmp/pip-build-3h0_r0m2/mod- wsgi/setup.py';f=getattr(tokenize, 'open', open) (文件);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" 安装 -- 记录 /tmp/pip-z7cobg1q-record/install-record.txt --single-version- 外部管理的 --compile" 失败,错误代码 1 在 /tmp/pip- 构建-3h0_r0m2/mod-wsgi/ 远程:推送被拒绝,无法编译 Python 应用程序。 偏僻的: 远程:推送失败 远程:验证部署... 偏僻的: 远程:推送拒绝 python-tehila。 偏僻的: 致https://git.heroku.com/python-tehila.git ! [remote denied] master -> master (pre-receive hook denied) 错误:未能将一些参考推送到'https://git.heroku.com/python- tehila.git'

【问题讨论】:

    标签: django python-3.x heroku


    【解决方案1】:

    也许这对你没有帮助,但我觉得我在 docker 上部署时遇到了类似的问题。对我来说,它通过将以下内容添加到我的 docker 文件中来帮助重新安装 python 头文件:

    运行 apt-get install python3-dev

    另外,我觉得这些是相关的:

    Installing mod_wsgi for Python3 on Ubuntu

    https://askubuntu.com/questions/569550/assertionerror-using-apache2-and-libapache2-mod-wsgi-py3-on-ubuntu-14-04-python

    最后我的致命错误是:

    src/server/wsgi_python.h:24:10: 致命错误:Python.h: 没有这样的文件或目录

    以下方法奏效了:

    fatal error: Python.h: No such file or directory

    【讨论】:

      猜你喜欢
      • 2018-10-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-09
      • 2021-05-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多