【发布时间】:2012-03-03 22:28:54
【问题描述】:
我正在尝试在 OSX 10.7.2 Lion 上配置 XAMPP 1.7.3 以使用 mod_wsgi 3.3。这是我正在做的事情:
- 为 OSX 1.7.3 和开发包安装了 XAMPP。目前一切运行良好。
- 下载并解压http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
./configuremakesudo make install- 这会将编译后的 mod_wsgi.so 文件复制到 OSX apache 中,但我希望它在 XAMPP 中,所以我复制:
sudo cp /usr/libexec/apache2/mod_wsgi.so /Applications/XAMPP/xamppfiles/modules/ - 将模块添加到 XAMPP httpd.conf
LoadModule wsgi_module modules/mod_wsgi.so -
启动 XAMPP Apache,我在 error_log 中得到以下通知:
[notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_wsgi/3.3 Python/2.7.1 PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
当我访问 http://localhost 时,我得到了这个错误(通过 Chrome):
`Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.`
这个错误被打印到error_log:
`[notice] child pid 22847 exit signal Bus error (10)`
我不知道如何解决此错误或我缺少什么。任何见解都值得赞赏!
更新
我发现了一个博客here,它讨论了通过以下命令使用 apache 扩展模块:
./configure --with-apxs=/Applications/XAMPP/xamppfiles/bin/apxs --with-python=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
配置看起来不错,但我得到这个编译器错误:
/Applications/XAMPP/xamppfiles/bin/apxs -c -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -Wc,'-arch i386' -Wc,'-arch ppc' mod_wsgi.c -Wl,-F/System/Library/Frameworks -framework Python -u _PyMac_Error /System/Library/Frameworks/ -arch i386 -arch ppc -ldl -framework CoreFoundation
Use of assignment to $[ is deprecated at /Applications/XAMPP/xamppfiles/bin/apxs line 86.
/Applications/XAMPP/xamppfiles/build/libtool --silent --mode=compile gcc -prefer-pic -I/Applications/XAMPP/xamppfiles/include -L/Applications/XAMPP/xamppfiles/lib -mmacosx-version-min=10.4 -arch i386 -arch ppc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/Applications/XAMPP/xamppfiles/include -I/Applications/XAMPP/xamppfiles/include -I/Applications/XAMPP/xamppfiles/include -I/Applications/XAMPP/xamppfiles/include -arch i386 -arch ppc -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//cco5iCcm.out
apxs:Error: Command failed with rc=65536
【问题讨论】:
标签: macos osx-lion xampp mod-wsgi