Python Apache2.4未能在Yosemite上加载mod_wsgi.so 问题
使用OS X Yosemite和Python 2.7,我试图遵循一个简单的规则,但在执行Python Apache2.4未能在Yosemite上加载mod_wsgi.so 问题,python,apache,mod-wsgi,Python,Apache,Mod Wsgi,使用OS X Yosemite和Python 2.7,我试图遵循一个简单的规则,但在执行apachectl-S时收到了这个错误: httpd: Syntax error on line 171 of /private/etc/apache2/httpd.conf: Cannot load libexec/mod_wsgi.so into server: dlopen(/usr/libexec/mod_wsgi.so, 10): image not found 我试过的 首先,我将该文件与其他m
apachectl-S
时收到了这个错误:
httpd: Syntax error on line 171 of /private/etc/apache2/httpd.conf: Cannot load libexec/mod_wsgi.so into server: dlopen(/usr/libexec/mod_wsgi.so, 10): image not found
我试过的
首先,我将该文件与其他mod.*
文件放在/usr/libexec/apache2/
中。其次,我尝试遵循并验证以下步骤:
1。您没有隐藏扩展,并且添加了两次扩展。
gwg$ file /usr/libexec/apache2/mod_wsgi.so
/usr/libexec/apache2/mod_wsgi.so: Mach-O 64-bit bundle x86_64
I'm not sure how to do this.
gwg$ sudo su -
root# python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
2。mod_wsgi.so文件对任何Apache服务用户都是可读的。
gwg$ file /usr/libexec/apache2/mod_wsgi.so
/usr/libexec/apache2/mod_wsgi.so: Mach-O 64-bit bundle x86_64
I'm not sure how to do this.
gwg$ sudo su -
root# python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
我不知道具体怎么做,但我只是对照其他文件检查了文件的权限。例如:
gwg$ ls -l mod_vhost_alias.so
-rwxr-xr-x 1 root wheel 19472 Sep 9 18:11 mod_vhost_alias.so
及
3。您的Apache是32[64]位。
gwg$ file /usr/libexec/apache2/mod_wsgi.so
/usr/libexec/apache2/mod_wsgi.so: Mach-O 64-bit bundle x86_64
I'm not sure how to do this.
gwg$ sudo su -
root# python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
4。您的Python是32[64]位。
gwg$ file /usr/libexec/apache2/mod_wsgi.so
/usr/libexec/apache2/mod_wsgi.so: Mach-O 64-bit bundle x86_64
I'm not sure how to do this.
gwg$ sudo su -
root# python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Per:
5。Python是为所有用户安装的,而不仅仅是作为用户安装的。
gwg$ file /usr/libexec/apache2/mod_wsgi.so
/usr/libexec/apache2/mod_wsgi.so: Mach-O 64-bit bundle x86_64
I'm not sure how to do this.
gwg$ sudo su -
root# python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
问题:
有什么帮助吗?提前感谢。使用brew
是我在Mac OS X上运行wsgi
最简单的方法。
这是顺序
brew点击自制/apache
brew安装mod_wsgi
如果需要xcode选择--install
您必须手动编辑/etc/apache2/httpd.conf以包含LoadModule wsgi\u module/usr/local/ceral/mod\u wsgi/3.X/libexec/mod\u wsgi.so
- 2014年12月X为5,但只需按照屏幕上显示的说明操作即可
检查是否一切正常
httpd-t
=>语法正常