現在WSLのUbuntuでlampを立てているところにpythonを動かせるようDjangoを入れてみようとしています。
そこの途中でpip install mod_wsgi
をしたのですがそこがうまくいきません。
最後にgccがなにやら出ていますがgccは入っています。
またsetuptoolsも一度アンインストールしてから入れなおしました。
エラー内容は量が多すぎたため一部削っているので必要な場合は追加します。
どう対処したらよいかわからないのでよろしくお願いします。
エラー内容
... WARNING: The Python installation you are using does not appear to have been installed with a shared library, or in the case of MacOS X, as a framework. Where these are not present, the compilation of mod_wsgi may fail, or if it does succeed, will result in extra memory being used by all processes at run time as a result of the static library needing to be loaded in its entirety to every process. It is highly recommended that you reinstall the Python installation being used from source code, supplying the '--enable-shared' option to the 'configure' script when configuring the source code prior to building and installing it. /home/ユーザー名/.pyenv/versions/3.7.2/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) ... gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_daemon.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_daemon.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_interp.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_interp.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_logger.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_logger.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include src/server/wsgi_logger.c: In function ‘wsgi_log_python_error’: src/server/wsgi_logger.c:697:33: warning: variable ‘thread_info’ set but not used [-Wunused-but-set-variable] WSGIThreadInfo *thread_info; ^ gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_memory.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_memory.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_metrics.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_metrics.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_restrict.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_restrict.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_server.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_server.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_stream.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_stream.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_thread.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_thread.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/apache2 -I/home/ユーザー名/.pyenv/versions/3.7.2/include/python3.7m -c src/server/wsgi_validate.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_validate.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -DBUILD_DATETIME='"2018-06-07T19:43:03"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include gcc -pthread -shared -L/home/ユーザー名/.pyenv/versions/3.7.2/lib -L/home/ユーザー名/.pyenv/versions/3.7.2/lib build/temp.linux-x86_64-3.7/src/server/mod_wsgi.o build/temp.linux-x86_64-3.7/src/server/wsgi_apache.o build/temp.linux-x86_64-3.7/src/server/wsgi_buckets.o build/temp.linux-x86_64-3.7/src/server/wsgi_convert.o build/temp.linux-x86_64-3.7/src/server/wsgi_daemon.o build/temp.linux-x86_64-3.7/src/server/wsgi_interp.o build/temp.linux-x86_64-3.7/src/server/wsgi_logger.o build/temp.linux-x86_64-3.7/src/server/wsgi_memory.o build/temp.linux-x86_64-3.7/src/server/wsgi_metrics.o build/temp.linux-x86_64-3.7/src/server/wsgi_restrict.o build/temp.linux-x86_64-3.7/src/server/wsgi_server.o build/temp.linux-x86_64-3.7/src/server/wsgi_stream.o build/temp.linux-x86_64-3.7/src/server/wsgi_thread.o build/temp.linux-x86_64-3.7/src/server/wsgi_validate.o -o build/lib.linux-x86_64-3.7/mod_wsgi/server/mod_wsgi-py37.cpython-37m-x86_64-linux-gnu.so -L/home/ユーザー名/.pyenv/versions/3.7.2/lib -L/home/ユーザー名/.pyenv/versions/3.7.2/lib/python3.7/config-3.7m-linux -lpython3.7m /usr/bin/ld: /home/ユーザー名/.pyenv/versions/3.7.2/lib/libpython3.7m.a(abstract.o): 再配置 R_X86_64_32S (`_Py_NotImplementedStruct' に対する) は共有オブジェクト作成時には使用 できません。-fPIC を付けて再コンパイルしてください。 /home/ユーザー名/.pyenv/versions/3.7.2/lib/libpython3.7m.a: error adding symbols: 不正な値です collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/home/ユーザー名/.pyenv/versions/3.7.2/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-u595aw0n/mod-wsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-9tk4kd3e/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-u595aw0n/mod-wsgi/
##環境
OS:Windows10 pro
WSL:Ubunutu 16.04.6
python:pyenvを使っており、現在はpython3.7.2です
gcc:gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
setuptools:40.8.0
pip:19.0.3
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。