无法在Centos 5.8中安装最新版本的PIL
问题描述:
我无法在我的Centos 5.8 x64上安装PIL。 我试图用pip install PIL命令来安装它。但它遇到了gcc错误。 请参见下面的错误片段:无法在Centos 5.8中安装最新版本的PIL
_imagingft.c:475: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
_imagingft.c:502: error: old-style parameter declarations in prototyped function definition
/usr/include/freetype2/freetype/freetype.h:1574: error: parameter name omitted
_imagingft.c:502: error: expected ‘{’ at end of input
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/local/bin/python -c "import setuptools;__file__='/home/acresearch/downloads/py-modules/PIL/build/PIL/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-tHfjOz-record/install-record.txt failed with error code 1 in /home/acresearch/downloads/py-modules/PIL/build/PIL
Storing complete log in /root/.pip/pip.log
如果蟒蛇-devel的,libjpg和libpng已安装是的,它们被安装(如在一些环节我读过可能的解决方案提到的)我已经选中。但是,错误仍然存在。
有关如何解决此问题的任何想法?提前致谢!
答
您好,我有同样的问题时,首先安装此
yum install gcc
现在你可以用
pip install PIL
安装PIL你有什么版本的gcc解决了吗? – Denis 2012-04-27 07:32:05
这是4.1.2 Dennis – jaysonpryde 2012-04-27 07:57:16
尝试更新到4.6.1 – Denis 2012-04-27 11:13:56