Ich verwende CentOS 6.7 und versuche, mod_wsgi zu installieren (https://code.google.com/p/modwsgi/)
Normalerweise würde ich einfach Folgendes tun:
yum installiere mod_wsgi
Da ich jedoch sicherstellen muss, dass es unter Python 2.7 kompiliert wird (und nicht unter der Standardversion von CentOS Python 2.6), habe ich beschlossen, das Repo herunterzuladen (https://github.com/GrahamDumpleton/mod_wsgi/releases) und stellen Sie sicher, dass es für mein Szenario konfiguriert ist.
Für die Installation bin ich der Office-Anleitung gefolgt:https://code.google.com/p/modwsgi/wiki/QuickInstallationGuide
Der einzige Unterschied besteht darin, dass ich die Python-Version geändert habe:
./configure --with-python=/usr/local/bin/python2.7
Die obigen Ergebnisse:
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
Das Ausführen von make gibt Folgendes zurück:
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
Jede Hilfe wäre willkommen!
Antwort1
Mir fehlten die Apache-Entwicklertools:
yum installiere httpd-devel