2016-04-29 130 views
0

當我試圖使用問題在安裝LXML

pip install --upgrade lxml 

安裝LXML ..我我收到以下錯誤

/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-  
linux/4.7.2/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 

如何解決這個問題?

回答

0

我可以能夠與這裏的解決方案

How to ignore local python when building python from source

Python 2.7.6: 
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz 
tar xf Python-2.7.6.tar.xz 
cd Python-2.7.6 
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared    LDFLAGS="-Wl,-rpath /usr/local/lib" 
make && make altinstall 
解決問題