On Tuesday, March 18, 2014 8:26:44 PM UTC-6, Graham Dumpleton wrote: > > The error: > > /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation > R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared > object; recompile with -fPIC > /usr/local/lib/libpython2.7.a: could not read symbols: Bad value > > is documented in: > > > http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bit_And_64_Bit_Packages > > In short, when you installed Python yourself from source code, you did not > enable the installation of shared libraries for Python. > > You would either need to 'make distclean' your Python source code and > rerun 'configure' with --enable-shared and your option required options, > thence rebuild and reinstall. Or, install from a proper binary package > repository as suggested by Jason. >
Thanks. I took Jason's advise and it's working. > > On 19/03/2014, at 1:58 AM, [email protected] <javascript:> < > [email protected] <javascript:>> wrote: > > I am on CentOS 6.4. I need to upgrade my python version to 2.7. I did that > and I rebuilt django with it. Then I got these errors from Apache: > > [Tue Mar 18 10:38:43 2014] [error] [client 10.250.139.129] mod_wsgi > (pid=16338): Target WSGI script '/usr/local/motor/motor/wsgi.py' cannot be > loaded as Python module. > [Tue Mar 18 10:38:43 2014] [error] [client 10.250.139.129] mod_wsgi > (pid=16338): Exception occurred processing WSGI script > '/usr/local/motor/motor/wsgi.py'. > [Tue Mar 18 10:38:43 2014] [error] [client 10.250.139.129] Traceback (most > recent call last): > [Tue Mar 18 10:38:43 2014] [error] [client 10.250.139.129] File > "/usr/local/motor/motor/wsgi.py", line 7, in <module> > [Tue Mar 18 10:38:43 2014] [error] [client 10.250.139.129] from > django.core.wsgi import get_wsgi_application > [Tue Mar 18 10:38:43 2014] [error] [client 10.250.139.129] ImportError: No > module named django.core.wsgi > > I figured this was because i did not rebuild wsgi, so I tried to do that > and the make failed with: > > /usr/sbin/apxs -c -I/usr/local/include/python2.7 -DNDEBUG mod_wsgi.c > -L/usr/local/lib -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread > -ldl -lutil -lm > /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 > -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security > -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread > -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 > -I/usr/local/include/python2.7 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && > touch mod_wsgi.slo > In file included from /usr/local/include/python2.7/Python.h:8, > from mod_wsgi.c:142: > /usr/local/include/python2.7/pyconfig.h:1179:1: warning: "_POSIX_C_SOURCE" > redefined > In file included from /usr/include/sys/types.h:26, > from /usr/include/apr-1/apr-x86_64.h:127, > from /usr/include/apr-1/apr.h:19, > from /usr/include/httpd/ap_config.h:25, > from /usr/include/httpd/httpd.h:43, > from mod_wsgi.c:34: > /usr/include/features.h:162:1: warning: this is the location of the > previous definition > In file included from /usr/local/include/python2.7/Python.h:8, > from mod_wsgi.c:142: > /usr/local/include/python2.7/pyconfig.h:1201:1: warning: "_XOPEN_SOURCE" > redefined > In file included from /usr/include/sys/types.h:26, > from /usr/include/apr-1/apr-x86_64.h:127, > from /usr/include/apr-1/apr.h:19, > from /usr/include/httpd/ap_config.h:25, > from /usr/include/httpd/httpd.h:43, > from mod_wsgi.c:34: > /usr/include/features.h:164:1: warning: this is the location of the > previous definition > mod_wsgi.c: In function âwsgi_server_groupâ: > mod_wsgi.c:991: warning: unused variable âvalueâ > mod_wsgi.c: In function âLog_isattyâ: > mod_wsgi.c:1665: warning: unused variable âresultâ > mod_wsgi.c: In function âLog_writelinesâ: > mod_wsgi.c:1802: warning: unused variable âmsgâ > mod_wsgi.c: In function âAdapter_outputâ: > mod_wsgi.c:3087: warning: unused variable ânâ > mod_wsgi.c: In function âAdapter_file_wrapperâ: > mod_wsgi.c:4138: warning: unused variable âresultâ > mod_wsgi.c: In function âwsgi_python_termâ: > mod_wsgi.c:5850: warning: unused variable âtstateâ > mod_wsgi.c:5849: warning: unused variable âinterpâ > mod_wsgi.c: In function âwsgi_python_child_initâ: > mod_wsgi.c:7050: warning: unused variable âlâ > mod_wsgi.c:6948: warning: unused variable âinterpâ > mod_wsgi.c: In function âwsgi_add_import_scriptâ: > mod_wsgi.c:7701: warning: unused variable âerrorâ > mod_wsgi.c: In function âwsgi_add_handler_scriptâ: > mod_wsgi.c:8179: warning: unused variable âdconfigâ > mod_wsgi.c:8178: warning: unused variable âsconfigâ > mod_wsgi.c: In function âwsgi_hook_handlerâ: > mod_wsgi.c:9375: warning: suggest parentheses around assignment used as > truth value > mod_wsgi.c:9377: warning: suggest parentheses around assignment used as > truth value > mod_wsgi.c:9379: warning: suggest parentheses around assignment used as > truth value > mod_wsgi.c:9383: warning: suggest parentheses around assignment used as > truth value > mod_wsgi.c:9403: warning: suggest parentheses around assignment used as > truth value > mod_wsgi.c:9405: warning: suggest parentheses around assignment used as > truth value > mod_wsgi.c:9408: warning: suggest parentheses around assignment used as > truth value > mod_wsgi.c: In function âwsgi_daemon_workerâ: > mod_wsgi.c:10819: warning: unused variable âdurationâ > mod_wsgi.c:10818: warning: unused variable âstartâ > mod_wsgi.c: In function âwsgi_hook_daemon_handlerâ: > mod_wsgi.c:13172: warning: unused variable âiâ > mod_wsgi.c:13170: warning: unused variable âeltsâ > mod_wsgi.c:13169: warning: unused variable âheadâ > mod_wsgi.c: At top level: > mod_wsgi.c:8142: warning: âwsgi_set_user_authoritativeâ defined but not > used > mod_wsgi.c:15251: warning: âwsgi_hook_check_user_idâ defined not used > /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_wsgi.la -rpath > /usr/lib64/httpd/modules -module -avoid-version mod_wsgi.lo > -L/usr/local/lib -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread > -ldl -lutil -lm > /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation > R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared > object; recompile with -fPIC > /usr/local/lib/libpython2.7.a: could not read symbols: Bad value > collect2: ld returned 1 exit status > apxs:Error: Command failed with rc=65536 > . > make: *** [mod_wsgi.la] Error 1 > > Can someone please help me with this? > > Thanks! > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] <javascript:> > . > Visit this group at http://groups.google.com/group/modwsgi. > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
