【发布时间】:2018-12-05 13:53:41
【问题描述】:
尝试从命令行安装 uWSGI
pip install uwsgi
导致堆栈跟踪很长,这里是它的结尾:
/usr/bin/x86_64-linux-gnu-ld: /usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(parser.o):
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
*** error linking uWSGI ***
----------------------------------------
Command "/home/user/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ve0nx9k8/uwsgi/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-l_7f937a/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/venv/include/site/python3.6/uwsgi" failed with error code 1 in /tmp/pip-install-ve0nx9k8/uwsgi/
我正在使用 Python 3.6。 Python 2 有效,Python 3.7 有效,但不幸的是我需要使用 Python 3.6。虚拟环境中没有其他东西,这是对 ubuntu 的全新重新安装。
【问题讨论】:
-
我找到了这个,看起来 venv 中没有解决方案。 github.com/unbit/uwsgi/issues/1770
-
@leech,你要安装哪个 uWSGI 版本?