gpt4 book ai didi

apache - 即使按照给定的步骤,mod_wsgi 也会在一个版本中编译并在不同版本中运行

转载 作者:行者123 更新时间:2023-12-02 07:13:01 25 4
gpt4 key购买 nike

在查看日志后,当我通过客户端运行 apache 服务器时,我收到错误,我了解到 mod_wsgi 在编译期间使用 python 2.6 并使用 python 2.7 运行。经过在互联网上的一些研究后,我按照以下步骤操作:

您必须重新编译 mod-python 和/或 mod-wsgi。

删除模组

apt-get remove libapache2-mod-python libapache2-mod-wsgi

获取依赖项

apt-get build-dep libapache2-mod-python libapache2-mod-wsgi

构建 mod-python

mkdir /tmp/python
cd /tmp/python
apt-get source libapache2-mod-python
cd libapache2-mod-python-[x.x.x]
dpkg-buildpackage -rfakeroot -b

构建 mod-wsgi

mkdir /tmp/wsgi
cd /tmp/wsgi
apt-get source libapache2-mod-wsgi
cd mod-wsgi-[x.x.x]
dpkg-buildpackage -rfakeroot -b

安装新编译的包

dpkg -i/tmp/python/libapache2-mod-python-[x.x].deb/tmp/wsgi/libapache2-mod-wsgi-[x.x].deb

没用,现在版本已经换成3.2了,我担心上面的步骤消耗了空间,现在编译python已经从2.6变成了python 3.2但是运行时使用的python还是2.7 。请帮我做什么?让我的 apache 服务器成功运行。

错误日志::::

[Wed Aug 21 11:48:11 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Wed Aug 21 11:48:11 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Wed Aug 21 11:48:11 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Wed Aug 21 11:48:36 2013] [notice] caught SIGTERM, shutting down


[Wed Aug 21 22:48:29 2013] [error] child process 1226 still did not exit, sending a SIGKILL
[Wed Aug 21 22:48:30 2013] [notice] caught SIGTERM, shutting down
[Wed Aug 21 22:56:17 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Wed Aug 21 22:56:17 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Wed Aug 21 22:56:17 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Thu Aug 22 01:32:12 2013] [notice] caught SIGTERM, shutting down
[Thu Aug 22 01:32:26 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Thu Aug 22 01:32:26 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Thu Aug 22 01:32:26 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Thu Aug 22 04:04:48 2013] [notice] child pid 11212 exit signal Segmentation fault (11)
[Thu Aug 22 04:04:48 2013] [notice] caught SIGTERM, shutting down
[Thu Aug 22 04:04:56 2013] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads.
[Thu Aug 22 04:04:56 2013] [notice] mod_python: using mutex_directory /tmp
[Thu Aug 22 04:04:56 2013] [warn] mod_wsgi: Compiled for Python/3.2.3.
[Thu Aug 22 04:04:56 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Thu Aug 22 04:04:56 2013] [notice] Apache/2.2.22 (Ubuntu) mod_python/3.3.1 Python/2.7.3 mod_wsgi/3.3 configured -- resuming normal operations

谢谢

最佳答案

如果不需要,请不要同时加载 mod_python 和 mod_wsgi。它们可能是针对不同的 Python 版本编译的。请参阅以下内容,了解您所看到的不匹配情况的解释。

如果您确实需要两者,则必须将它们编译为同一版本。

如今,通常没有充分的理由在新项目中使用 mod_python。

关于apache - 即使按照给定的步骤,mod_wsgi 也会在一个版本中编译并在不同版本中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18371324/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com