簡體   English   中英

CentOS 6.5,mod_wsgi,Apache無法將mod_wsgi.so加載到服務器中,未定義符號:PyExc_StopIteration

[英]CentOS 6.5, mod_wsgi, Apache Cannot load mod_wsgi.so into server, undefined symbol: PyExc_StopIteration

問題:

我無法使用mod_wsgi啟動apache服務器。 apachectl -t說:

httpd:/etc/httpd/conf/httpd.conf的第202行的語法錯誤:無法將/etc/httpd/modules/mod_wsgi.so加載到服務器中:/etc/httpd/modules/mod_wsgi.so:未定義的符號: PyExc_StopIteration

這是到目前為止我得到的:

Server version: Apache/2.2.15 (Unix)  
Python 3.3.5
mod_wsgi-3.4 (latest)

python編譯:

wget http://python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
tar xf Python-3.3.5.tar.xz
cd Python-3.3.5
./configure --prefix=/usr/local --enable-shared --with-threads
make && make altinstall

mod_wsgi編譯:

./configure --with-python = / usr / local / bin / python3.3

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

然后我編輯Makefile-替換:

LDLIBS =  -lpython3.3 -lpthread -ldl  -lutil -lm

LDLIBS =  -python3.3 -lpthread -ldl  -lutil -lm

(對不起,我不記得在哪兒讀過這篇文章,但是上次我在相同的系統配置上成功安裝mod_wsgi時對我有幫助)

使

---大量警告-

進行安裝

解:


由於我無法回答自己的問題“直到8名”,因此我將編輯自己的帖子。


不太熟悉編譯過程,我開始研究參數...而且沒有文件夾“ /usr/local/lib/python3.3/config”! 憑空猜測,我對生成的Makefile進行了下一次更改,現在可以使用了!

< LDFLAGS = -L/usr/local/lib -L/usr/local/lib/python3.3/config

< LDLIBS = -lpython3.3 -lpthread -ldl -lutil -lm

------------

> LDFLAGS = -L/usr/local/lib -L/usr/local/lib/python3.3/config-3.3m

> LDLIBS = -lpython3.3m -lpthread -ldl -lutil -lm

不太熟悉編譯過程,我開始研究參數...而且沒有文件夾“ /usr/local/lib/python3.3/config”! 憑空猜測,我對生成的Makefile進行了下一次更改,現在可以使用了!

< LDFLAGS = -L/usr/local/lib -L/usr/local/lib/python3.3/config

< LDLIBS = -lpython3.3 -lpthread -ldl -lutil -lm

------------

> LDFLAGS = -L/usr/local/lib -L/usr/local/lib/python3.3/config-3.3m

> LDLIBS = -lpython3.3m -lpthread -ldl -lutil -lm

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM