I was getting the following error even though the zlib dev libraries were already installed correctly.
.. code-block:: python
| PIL 1.1.7 SETUP SUMMARY |
|---|
| version 1.1.7 platform linux2 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] |
*** TKINTER support not available *** JPEG support not available *** ZLIB (PNG/ZIP) support not available *** FREETYPE2 support not available *** LITTLECMS support not available ——————————————————————– To add a missing option, make sure you have the required library, and set the corresponding ROOT variable in the setup.py script.
Apparently PIL setup.py doesn’t know how to find libz.so.
PIL expects libz.so to be located in /usr/lib not /usr/lib/i386-linux-gnu/libz.so
I fixed this issue by building a link to were PIL setup.py looks and where the library really exists!
.. code-block:: bash
find . -name libz.so
Create a soft link from libz.so to /usr/lib
Ubuntu 32bit:
.. code-block:: bash
sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib
Ubuntu 64bit:
.. code-block:: bash
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
You might need to delete the PIL egg from your pythons site-packages directory and attempt to re-install the package
.. code-block:: bash
sudo apt-get build-dep python-imaging