G
G
Georgy Baruchyan2016-11-03 02:52:10
Python
Georgy Baruchyan, 2016-11-03 02:52:10

Why can't I install mod_wsgi 4.5.7?

Hello. I've been struggling with deploying django to apache for a day now.
The whole process takes place on VPS. Debian OS
has now removed all the mod_wsgi files that I had previously installed with ,skb.
I downloaded mod wsgi 4.5.7 I execute
python setup.py install
The end of the installation is like this

src/server/mod_wsgi.c: In function ‘wsgi_process_proxy_headers’:
src/server/mod_wsgi.c:13372:25: warning: variable ‘value’ set but not used [-Wunused-but-set-variable]
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/local/include/python3.5m -c src/server/wsgi_server.c -o build/temp.linux-x86_64-3.5/src/server/wsgi_server.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/local/include/python3.5m -c src/server/wsgi_validate.c -o build/temp.linux-x86_64-3.5/src/server/wsgi_validate.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/local/include/python3.5m -c src/server/wsgi_convert.c -o build/temp.linux-x86_64-3.5/src/server/wsgi_convert.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/local/include/python3.5m -c src/server/wsgi_metrics.c -o build/temp.linux-x86_64-3.5/src/server/wsgi_metrics.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/local/include/python3.5m -c src/server/wsgi_apache.c -o build/temp.linux-x86_64-3.5/src/server/wsgi_apache.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/local/include/python3.5m -c src/server/wsgi_restrict.c -o build/temp.linux-x86_64-3.5/src/server/wsgi_restrict.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/local/include/python3.5m -c src/server/wsgi_thread.c -o build/temp.linux-x86_64-3.5/src/server/wsgi_thread.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apache2 -I. -I/usr/include -I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include
gcc -pthread -shared build/temp.linux-x86_64-3.5/src/server/wsgi_stream.o build/temp.linux-x86_64-3.5/src/server/wsgi_daemon.o build/temp.linux-x86_64-3.5/src/server/wsgi_interp.o build/temp.linux-x86_64-3.5/src/server/wsgi_logger.o build/temp.linux-x86_64-3.5/src/server/wsgi_buckets.o build/temp.linux-x86_64-3.5/src/server/wsgi_memory.o build/temp.linux-x86_64-3.5/src/server/mod_wsgi.o build/temp.linux-x86_64-3.5/src/server/wsgi_server.o build/temp.linux-x86_64-3.5/src/server/wsgi_validate.o build/temp.linux-x86_64-3.5/src/server/wsgi_convert.o build/temp.linux-x86_64-3.5/src/server/wsgi_metrics.o build/temp.linux-x86_64-3.5/src/server/wsgi_apache.o build/temp.linux-x86_64-3.5/src/server/wsgi_restrict.o build/temp.linux-x86_64-3.5/src/server/wsgi_thread.o -o build/lib.linux-x86_64-3.5/mod_wsgi/server/mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so -L/usr/local/lib -L/usr/local/lib/python3.5/config-3.5m -lpython3.5m
/usr/bin/ld: /usr/local/lib/libpython3.5m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython3.5m.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

When doing aptitude install libapache2-mod-wsgi I also get a bunch of errors

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bwlg, 2017-08-04
@bwlg

Although the question was asked a year ago, the developer has the answer:
GrahamDumpleton commented on 1 Jun 2016:
Your Python installation was not configured with --enable-shared when it was built. You will need to reinstall the
Taken from here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question