Mod_Wsgi PythonHome不工作
所以我犯了运行Ubuntu服务器(12.04)的错误。我已经安装了Python3和mod_wsgi的Python3版本 Apache2启动-但保留以下错误日志:Mod_Wsgi PythonHome不工作,python,django,ubuntu,mod-wsgi,wsgi,Python,Django,Ubuntu,Mod Wsgi,Wsgi,所以我犯了运行Ubuntu服务器(12.04)的错误。我已经安装了Python3和mod_wsgi的Python3版本 Apache2启动-但保留以下错误日志: [Mon May 05 11:00:24 2014] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'. [Mon May 05 11:00:24 2014] [error] python_init: Python executa
[Mon May 05 11:00:24 2014] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Mon May 05 11:00:24 2014] [error] python_init: Python executable found '/usr/bin/python'.
[Mon May 05 11:00:24 2014] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/$
[Mon May 05 11:00:24 2014] [notice] mod_python: Creating 8 session mutexes based on 80 max processes and 0 max threads.
[Mon May 05 11:00:24 2014] [notice] mod_python: using mutex_directory /tmp
[Mon May 05 11:00:24 2014] [warn] mod_wsgi: Compiled for Python/3.2.2+.
[Mon May 05 11:00:24 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Mon May 05 11:00:24 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.11 with Suhosin-Patch mod_python/3.3.1 Python/2.7.3 mod_wsgi/3.3 configured$
[Mon May 05 11:00:25 2014] [notice] child pid 10860 exit signal Segmentation fault (11)
[Mon May 05 11:00:25 2014] [notice] child pid 10861 exit signal Segmentation fault (11)
[Mon May 05 11:00:25 2014] [notice] child pid 10863 exit signal Segmentation fault (11)
[Mon May 05 11:00:27 2014] [notice] child pid 10864 exit signal Segmentation fault (11)
[Mon May 05 11:00:27 2014] [notice] child pid 10865 exit signal Segmentation fault (11)
这是我的WSGI.conf
<IfModule mod_wsgi.c>
WSGIPythonHome /usr/bin/python3.2
WSGIPythonPath /home/user/.virtualenvs/my_env/lib/python3.2/site-packages/
</IfModule>
WSGIPythonHome/usr/bin/python3.2
WSGIPythonPath/home/user/.virtualenvs/my_env/lib/python3.2/site-packages/
我在谷歌上搜索了两个小时,什么都没有,所以我很想安装一个不同的服务器操作系统,但是重新上传/重新解析比特币区块链至少需要一天的时间 WSGIPythonHome不会做任何事情,因为您也在将mod_python加载到Apache实例中。在这种情况下,mod_python将覆盖正在使用的python版本 WSGIPythonHome的文档中提到了这一点
因此,如果您不需要mod_python,请停止将其加载到Apache中。检查此WSGIPythonHome:python prefix/exec_prefix directories.IOW的绝对路径,'import sys;系统前缀'。它不是指“python”可执行文件的文件名。“python”可执行文件的文件名是“sys.executable”,它与“prefix”不同,不是“prefix”。我差一点就明白了——但现在又出现了另一个错误:致命的Python错误:Py_初始化:无法获取区域设置编码导入错误:没有名为encodingsmhm的模块,手册对此不是很清楚。例如:“注意:此处描述的WSGIPythonExecutable指令已在mod_wsgi版本2.0中删除。应改用WSGIPythonHome指令。”(意味着后者是替代品)。无论如何,我尝试在没有Pythonhome的情况下运行它,并安装默认的python3.2,但仍然会出现编码错误。我会尝试重新编译到一个新的虚拟版本。