Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

the verison of RPM is:

httpd-2.2.3-63.el5.centos.1
httpd-devel-2.2.3-63.el5.centos.1
apr-1.2.7-11.el5_3.1
apr-devel-1.2.7-11.el5_3.1
apr-util-1.2.7-11.el5
apr-util-devel-1.2.7-11.el5

the version of Python is 2.7
the version of mod_python is mod_python-3.3.1

My OS is:
Linux YF-23-73 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

when I install mod_python, I do like:
./configure --with-apxs=/usr/sbin/apxs

and
make

the error messages is:

 /usr/bin/ld: /usr/local/lib/python2.7/config/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/python2.7/config/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_python.so] Error 1
make[1]: Leaving directory `/opt/python_mod/mod_python-3.3.1/src'
make: *** [do_dso] Error 2


How to solve it? Thank you.

share|improve this question

migrated from stackoverflow.com May 3 '13 at 8:23

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 3 down vote accepted

Your Python installation must be configured with --enable-shared when installed.

Do be aware that the mod_python project is officially no longer developed or supported. You should really look for alternatives. You certainly shouldn't be using it for new projects. Also be aware that Django has deprecated support for using mod_python and may have even removed the support already.

share|improve this answer

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.