Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When i do "make" in mod_wsgi folder i get this error

I configured using following

./configure --with-apxs=/usr/local/apache/bin/apxs   --with-python=/opt/python27/bin/python

/usr/bin/ld: /opt/python27/lib/libpython2.7.a(node.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /opt/python27/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status apxs:Error: Command failed with rc=65536

This link has the solution but i could not understand it fully

1)How can i found that i have compiled x32bit or x64 bit version of python 
2)I didn't understand about what symbolic link he was talking about
share|improve this question
up vote 7 down vote accepted

The important bit is to rebuild Python with --enable-shared. The symlink comments are not relevant if you haven't done that and should't even apply with recent Python/mod_WSGI versions.

share|improve this answer
I tried that , i reinstalled with --enabled shared and same thing happens . how can i check that if enabled shared actually installed or not. i did this ./configure --prefix=/opt/python27 --enable-shared is there any way to confirm that – Mirror51 May 25 '11 at 4:37
You should see a in the /opt/python2.7/lib or /opt/python2.7/lib/python2.7/config directory. – Graham Dumpleton May 25 '11 at 7:14
I could not found that file i can see this file in both locations libpython2.7.a . If file is not there does it means that i have to recompile python again. i remembered i used --enabled shared option – Mirror51 May 25 '11 at 7:31
It means that what was installed didn't have shared library support enabled when it was built. Ensure that when you rebuild that you run 'make distclean' first before running 'configure' again and include '--enable-shared' in the options to 'configure'. You might even rename '/opt/python2.7' to '/opt/python2.7.static' while you do it to ensure that it recreates it and that installed version not causing problems. – Graham Dumpleton May 26 '11 at 7:03
thanks graham , mod_wsgi is installed now. i din't knew i had to use make distclean thanks – Mirror51 May 26 '11 at 8:52

Your Answer


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.