我无法在我的 Centos 5.8 x64 上安装 PIL。我尝试使用 pip install PIL 命令安装它。但它遇到 gcc 错误。请看下面的错误片段:
_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
我已经检查过是否已经安装了 python-devel、libjpg 和 libpng(在我读过的一些链接上提到了可能的解决方案),是的,它们已安装。但是,仍然会出现错误。
关于如何解决这个问题的任何想法?提前致谢!