PySide安装问题 [英] Problems with PySide installation
问题描述
尽管安装了14.04,但我在新安装的Xubuntu上安装了python2.7.9. PySide安装卡住了Shiboken
I have python2.7.9 on my new Xubuntu installation, albeit it's 14.04. PySide installation stuck with Shiboken
Linking CXX shared library libshiboken-python2.7.so
/usr/bin/ld: /usr/local/lib/libpython2.7.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/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libshiboken/libshiboken-python2.7.so.1.2.2] Error 1
make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
make: *** [all] Error 2
error: Error compiling shiboken
经过一些搜索"后,我得出结论,可以通过在./configure
选项中添加--enable-shared
来解决该问题.
After some "googling" I concluded that the problem could be solved with add --enable-shared
at ./configure
options.
以下文档尝试以几种方式安装Shiboken
,但是失败后,尝试在我无法找到的源文件中找到配置.
Following docs tried to installed Shiboken
in several ways, but after failed, tried to find configure in source files which I couldn't.
请帮助.谢谢.
推荐答案
输出显示它正在尝试链接到静态python库,而不是共享库-即 libpython2.7.a ,而不是 libpython2.7.so .
The output is showing that it's trying to link against a static python library, rather than a shared one - i.e. libpython2.7.a, rather than libpython2.7.so.
因此,需要使用--enable-shared
重新编译 python ,而不是shiboken.
Thus, it's python that needs to be re-compiled with --enable-shared
, not shiboken.
这篇关于PySide安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!