2016-09-27 96 views
2

我在我的新Xubuntu安装上安装了python2.7.9,尽管它是14.04。 PySide安装套牢Shiboken安装PySide的问题

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来解决。

以下文档试图以几种方式安装Shiboken,但失败后,尝试在源文件中找到我无法配置的配置。

请帮忙。谢谢。

回答

3

输出表示它试图对一个静态蟒库链接,而不是共享的一个 - 即libpython2.7.a,而不是libpython2.7.so

因此,它的python需要与--enable-shared重新编译,而不是shiboken。

+0

现在一切正常,谢谢。 – Alex