CentOS 6.5,mod

编程入门 行业动态 更新时间:2024-10-27 02:29:16
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:undefined symbol: 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

解:


因为我不能回答我自己的问题“直到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

The problem:

I can't start apache server with mod_wsgi. apachectl -t says:

httpd: Syntax error on line 202 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: undefined symbol: PyExc_StopIteration

Here's what I got so far:

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

python compilation:

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 compilation:

./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

SOLUTION:


since I can't answer my own question "till 8 reputation", I gonna edit my own post.


Being familiar with compilation process not too much, I've started looking into parameters... and there were no folder "/usr/local/lib/python3.3/config"! With a wild guess, I made next changes to generated Makefile, and now it works!

< 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

Being familiar with compilation process not too much, I've started looking into parameters... and there were no folder "/usr/local/lib/python3.3/config"! With a wild guess, I made next changes to generated Makefile, and now it works!

< 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

更多推荐

本文发布于:2023-08-05 05:25:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428481.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:CentOS   mod

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!