Apache mod_wsgi安裝錯誤

Apache mod_wsgi安裝錯誤

我正在運行 CentOS 6.7,我正在嘗試安裝 mod_wsgi (https://code.google.com/p/modwsgi/

通常我會這樣做:

百勝安裝 mod_wsgi

但由於我需要確保它在 Python 2.7 下編譯(而不是 CentOS 預設的 Python 2.6 版本),所以我決定下載該儲存庫(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

相關內容