mac 下安装mod_wsgi

下载:mod_wsgi-3.4.tar.gz

解压: tar -xvf mod_wsgi-3.4.tar.gz

进入目录:cd mod_wsgi-3.4

检测:./configure

checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... 2.2.26
checking for python... /usr/bin/python
configure: creating ./config.status
config.status: creating Makefile

可以make

make报错:

env: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc: No such file or directory
apxs:Error: Command failed with rc=65536

网上找到解决办法:

Try going to:

/Applications/Xcode.app/Contents/Developer/Toolchains/

and do:

ln -s XcodeDefault.xctoolchain OSX10.9.xctoolchain

sudo执行成功了。

再次make,7 warnings generated.  没有错直接install了。

sudo make install

/usr/sbin/apxs -i -S LIBEXECDIR=/usr/libexec/apache2 -n 'mod_wsgi' mod_wsgi.la
/usr/share/httpd/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build-1/libtool' mod_wsgi.la /usr/libexec/apache2
/usr/share/apr-1/build-1/libtool --mode=install cp mod_wsgi.la /usr/libexec/apache2/
cp .libs/mod_wsgi.so /usr/libexec/apache2/mod_wsgi.so
cp .libs/mod_wsgi.lai /usr/libexec/apache2/mod_wsgi.la
cp .libs/mod_wsgi.a /usr/libexec/apache2/mod_wsgi.a
chmod 644 /usr/libexec/apache2/mod_wsgi.a
ranlib /usr/libexec/apache2/mod_wsgi.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/libexec/apache2

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/libexec/apache2/mod_wsgi.so

安装成功。


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。