我无法将 twisted 10.2.0 安装到我的 ubuntu 机器上。下载扭曲源后,我发出命令:pypy setup.py install。之后我收到错误:
building 'twisted.runner.portmap' extension
creating build/temp.linux-x86_64-2.5
creating build/temp.linux-x86_64-2.5/twisted
creating build/temp.linux-x86_64-2.5/twisted/runner
cc -I/builds/pypy-1.4.1-linux64/include -c twisted/runner/portmap.c -o build/temp.linux-x86_64-2.5/twisted/runner/portmap.o
cc -shared build/temp.linux-x86_64-2.5/twisted/runner/portmap.o -o build/lib.linux-x86_64-2.5/twisted/runner/portmap.pypy-14.so
/usr/bin/ld.bfd.real: build/temp.linux-x86_64-2.5/twisted/runner/portmap.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
build/temp.linux-x86_64-2.5/twisted/runner/portmap.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'cc' failed with exit status 1
那么,我该如何解决呢?谢谢。
最佳答案
这是扭曲构建中的一个“错误”。它可能是也可能不是错误——twisted 不认为它的 C 扩展是可选的,尽管它们在大多数情况下都不是必需的。如果您只是将 PYTHONPATH 指向它所在的位置,但没有那些 C 扩展,Twisted 仍然可以工作。
关于python - 如何使用 pypy 1.4.1 安装 twisted 10.2.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5126039/