当我尝试使用
安装lxml时pip install --upgrade 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 :(得分: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