我不能在我的ubuntu机器上安装twisted 10.2.0。下载扭曲源代码后,我发出命令: 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那么,我该如何修复它呢?谢谢。
发布于 2011-02-26 18:09:06
这是扭曲构建中的一个"bug“。它可能是错误,也可能不是错误-- twisted不认为它的C扩展是可选的,尽管它们在大多数情况下都不是必需的。
发布于 2011-02-27 01:41:55
您可以通过注释掉the following line in setup.py (73)来跳过构建扩展
conditionalExtensions = getExtensions(),这应该避免收集和尝试构建分散在目录树中的扩展。
发布于 2011-10-09 18:44:15
到目前为止,扭曲的主干可以用PyPy编译得很好(我使用了1.6.1-dev0)。但是,为了安装Twisted,您需要将我提交给stdlib的patch应用到zipfile.py。
因此,在使用CPython以外的其他GC模型的PyPy下,安装会失败。
https://stackoverflow.com/questions/5126039
复制相似问题