Installing PIL in Ubuntu 11.10 Oneiric 64-bit using pip raise problem on JPEG, Zlib or freetype support. First, you need to uninstall PIL by :
sudo pip uninstall PIL
Then you should install default Ubuntu packages :
sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
We should fix PIL path libraries by :
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
Now we are ready installing PIL by :
sudo pip install -U PIL
And you will get results :
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
--------------------------------------------------------------------
This is also solve PIL problem “decoder zip not available“.
其实最主要的是这句话,今天就被这个纠缠了好久..想起了windows的日子...,生成软链的时候注意地址,这个是64位的机器.
原文地址:http://obroll.com/install-python-pil-python-image-library-on-ubuntu-11-10-oneiric/