OpenERP在打印销售报价单时报错"decoder zip not available",Google后发现是PIL安装有问题。
原先的安装方法:
$ wget http://effbot.org/media/downloads/PIL-1.1.7.tar.gz $ tar zxvf PIL-1.1.7.tar.gz $ cd PIL-1.1.7 $ python setup.py install
问题根源在于安装时没有检测到必要的依赖库(JPEG,ZLIB和FREETYPE):
$ python setup.py build_ext -i -------------------------------------------------------------------- PIL 1.1.7 SETUP SUMMARY -------------------------------------------------------------------- version 1.1.7 platform linux2 2.6.6 (r266:84292, Feb 22 2013, 00:00:18) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] -------------------------------------------------------------------- *** TKINTER support not available *** JPEG support not available *** ZLIB (PNG/ZIP) support not available *** FREETYPE2 support not available *** LITTLECMS support not available --------------------------------------------------------------------
安装依赖库(CentOS 6.4 64bit):
$ yum install libjpeg-turbo-devel $ yum install zlib-devel $ yum install freetype-devel $ yum install lcms-devel
重新安装PIL:
$ python setup.py install
参考: