[英]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)
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
./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.