Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to install Python 3.2 and mod_wsgi on my web server, but I am not having much luck.

I downloaded the Python source files and compiled using this command:

./configure --enable-shared --prefix=/opt/python-3-2 LDFLAGS="-Wl,-rpath /opt/python-3-2/lib"

I also modified my path variable to include /opt/python-3-2/bin and created a symlink to the python3 binary from /opt/python-3-2/bin/python. Now if I run python from the command line I get the proper prompt.

> python
Python 3.2.2 (default, Jan 20 2012, 18:14:20)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

I am using the following settings to compile the latest version of mod_wsgi

./configure --with-apxs=/usr/sbin/apxs --with-python=/opt/python-3-2/bin/python3

This produces the following errors

mod_wsgi.c:8937: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8939: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8941: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8945: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8965: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8967: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8970: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c: In function 'wsgi_daemon_worker':
mod_wsgi.c:10279: warning: unused variable 'duration'
mod_wsgi.c:10278: warning: unused variable 'start'
mod_wsgi.c: In function 'wsgi_hook_daemon_handler':
mod_wsgi.c:12499: warning: unused variable 'i'
mod_wsgi.c:12497: warning: unused variable 'elts'
mod_wsgi.c:12496: warning: unused variable 'head'
mod_wsgi.c: In function 'Auth_environ':
mod_wsgi.c:13375: warning: assignment makes pointer from integer without a cast
mod_wsgi.c: At top level:
mod_wsgi.c:7154: warning: 'wsgi_set_py3k_warning_flag' defined but not used
mod_wsgi.c:7856: warning: 'wsgi_set_user_authoritative' defined but not used
mod_wsgi.c:14414: warning: 'wsgi_hook_check_user_id' defined but not used
/usr/lib/apr-1/build/libtool --silent --mode=link gcc -o mod_wsgi.la  -rpath /usr/lib/httpd/modules -module -avoid-version    mod_wsgi.lo -L/opt/python-3-2/lib -L/opt/python-3-2/lib/python3.2/config -lpython3.2 -lpthread -ldl -lutil -lm
/usr/bin/ld: cannot find -lpython3.2
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536

I have tried creating a symlink from /opt/python-3-2/lib/python3.2/config -> /opt/python-3-2/lib/libpython3.so but it didn't help.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You must currently use mod_wsgi source code from source code repository for Python 3.2, you cannot use mod_wsgi 3.3 source code.

share|improve this answer
    
Exact same issue with mod_wsgi 3.2 –  Brandon Wamboldt Jan 22 '12 at 1:01
    
I didn't say to use mod_wsgi 3.2. I said that if using Python 3.2, but need to use the mod_wsgi source code from the source code repository. code.google.com/p/modwsgi/source/checkout –  Graham Dumpleton Jan 23 '12 at 6:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.