0
I've been trying to install mod_wsgi configured for Python 3.2 on a CentOS machine and I keep running into the error:
/usr/bin/ld: cannot find -lpython3.2
As near as I can tell this is caused by a missing libpython3.2.so
or equivalent, but I can't seem to figure out how to create that file.
Some pertinent data:
- The Python install is 3.2, downloaded from python.org as a
tar.bz2
- The
md5sum
ofPython-3.2.tar.bz2
matches the one on Python.org - This problem happens both with the version of mod_wsgi from the hg repository and from
mod_wsgi-3.3.tar.gz
(I do realize this could also be a serverfault question, but this seemed like the more intuitive forum).
(Output below for reference)
[root@<>mod_wsgi-3.3]# ./configure PYTHON=/usr/local/bin/python3.2
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... 2.2.3
configure: creating ./config.status
config.status: creating Makefile
[root@<> mod_wsgi-3.3]# make
... (I will include this if requested, but it makes it easier to
read if this is removed)
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/usr/local/lib
-L/usr/local/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
.
make: *** [mod_wsgi.la] Error 1
[root@<> mod_wsgi-3.3]#
Can you list the files under
/usr/local/lib/python3.2/config
in your post? – John T – 2011-09-01T17:23:20.557It does not seem to be there... Was this an install directive I missed? – cwallenpoole – 2011-09-01T17:28:32.820
The makefile is looking for a config in that directory for the linker (
ld
). You can modify the makefile to point to your Python install or re-install python under the standard directory. – John T – 2011-09-01T18:06:52.140How would I go about finding out how to do that? (I'm just using ./configure --enable-shared; make; make install for the Python install) – cwallenpoole – 2011-09-01T18:39:55.170
What are all the actual 'configure' arguments you supplied when building Python? For mod_wsgi, to indicate where Python installed, you are supposed to use --with-python option and not set PYTHON variable when running configure. – Graham Dumpleton – 2011-09-01T20:16:43.203
I built python with
./configure --enable-shared
;make
;make install
– cwallenpoole – 2011-09-01T20:32:43.627As to PYTHON= vs. --with-python=, it appears (based on the configure file) that both accomplish the same thing. Either way, neither one works. – cwallenpoole – 2011-09-01T20:33:59.740