想在Mac osx自带的apache上配置django环境,需要安装 mod_wsgi。但是遇到一系列问题。
查了几个小时资料,终于解决。最新的Mac osx系统或会出现。
mod_wsgi 的安装过程网上都有,这里不再累述。
安装完成后,输入 make 时,问题出现了:
mod_wsgi.c:34:10: fatal error: 'httpd.h' file not found
#include "httpd.h"
^
1 error generated.
apxs:Error: Command failed with rc=65536
为什么会这样:
目录 /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/ 里的东东不知道什么原因被移动到 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain 下面了。
解决办法: 红字的部分要注意
$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain
接下来可能还有问题,传送门在这里:
http://www.xenabeast.com/solution-re-install-mod_wsgi-mac-upgrading-osx-mavericks-10-9/