python 安装PIL模块

python要处理图片就要安装PIL模块,在安装过程中可能回报一个错误  

/usr/bin/ld: /usr/local/lib/libpython2.6.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.6.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

解决方案是把/usr/local/lib/libpython2.6.a 这个文件给搞掉,再执行 python  setup.py install 就行了

猜你喜欢

转载自blog.csdn.net/u014761344/article/details/41944961