2016-04-29 92 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 
解决问题