Apache mod_wsgi 安装错误

Apache mod_wsgi 安装错误

我正在运行 CentOS 6.7,我正在尝试安装 mod_wsgi (https://code.google.com/p/modwsgi/

通常我只会这样做:

yum 安装 mod_wsgi

但由于我需要确保它可以在 Python 2.7 下编译(而不是 CentOS 默认的 Python 2.6 版本),所以我决定下载 repo(https://github.com/GrahamDumpleton/mod_wsgi/releases),并确保它已针对我的场景进行了配置。

对于安装,我遵循了办公室指南:https://code.google.com/p/modwsgi/wiki/QuickInstallationGuide

唯一的区别是我改变了 Python 版本:

./configure --with-python=/usr/local/bin/python2.7

以上返回:

checking for apxs2... no
checking for apxs... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for prctl... yes
checking Apache version... ./configure: line 2765: apxs: command not found
./configure: line 2765: apxs: command not found
./configure: line 2766: apxs: command not found
./configure: line 2769: /: is a directory

./configure: line 2964: apxs: command not found
configure: creating ./config.status
config.status: creating Makefile

运行 make 返回:

apxs -c -I/usr/local/include/python2.7 -DNDEBUG  -Wc,-g -Wc,-O2  src/server/mod_wsgi.c src/server/wsgi_*.c -L/usr/local/lib -L/usr/local/lib/python2.7/config  -lpython2.7 -lpthread -ldl  -lutil -lm
/bin/sh: apxs: command not found
make: *** [src/server/mod_wsgi.la] Error 127

任何帮助,将不胜感激!

答案1

我缺少 Apache 开发工具:

yum 安装 httpd-devel

相关内容