问题:
我无法用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 altinstallmod_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 altinstallmod_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 MakefileSOLUTION:
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
更多推荐
发布评论