PIL - libjpeg.so.8: cannot open shared object file: No such file or directory

Also if you are doing local Python installations you can also control dynamic linking on the session level using LD_LIBRARY_PATH environment variable::

 export LD_LIBRARY_PATH=/srv/plone/python/python-2.6/lib
 python
 import _imaging
 ...

This way you cannot break your OS itself, even accidentally. (It happens: http://opensourcehacker.com/2011/08/31/zend-server-installation-potentially-kills-your-ssh/)


See an explanation here: Why can't Python find shared objects that are in directories in sys.path?

A quick fix is to add the directory that contains libjpeg.so.8 to your /etc/ld.so.conf file, and then run ldconfig