我在Python / Django网站上传图像时出错,因此安装了PIL库(带有CentOS的python 2.4上的1.1.6),并使用$ sudo yum install freetype freetype-devel jpeg jpeg-安装了jpeg库。使用wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
开发libpng libpng-devel和pil库解压缩后,运行:python setup.py build_ext -i和sudo python setup.py install
我得到了一长串错误,但它们以(以前的错误:预期的属性等等)结束了:
_imaging.c:3041: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âfunctionsâ
_imaging.c:3138: warning: return type defaults to âintâ
_imaging.c: In function âDL_EXPORTâ:
_imaging.c:3138: error: expected declaration specifiers before âinit_imagingâ
_imaging.c:3149: error: expected â{â at end of input
error: command 'gcc' failed with exit status 1
如果需要更多错误消息才能正确排除故障,请告诉我。