title: PIL - libjpeg.so.8: cannot open shared object file: No such file or directory
body: <p>Compiled the libjpeg v8, PIL 1.1.7 and and import for _imaging works on the system Python, but spouts this error inside the virtualenv:</p>
  
  <pre><code>libjpeg.so.8: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>here is the error run with a python -v interpreter inside the virtualenv</p>
  
  <pre><code>&gt;&gt;&gt; import _imaging
  dlopen("/home/ygamretuta/dev/py/django/lib/python2.6/site-packages/PIL/_imaging.so", 2);
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>and here are the paths:</p>
  
  <pre><code>/home/ygamretuta/dev/py/django/lib/python2.6/site-packages/distribute-0.6.14-py2.6.egg
  /home/ygamretuta/dev/py/django/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg
  /home/ygamretuta/dev/py/django/lib/python2.6
  /home/ygamretuta/dev/py/django/lib/python2.6/plat-linux2
  /home/ygamretuta/dev/py/django/lib/python2.6/lib-tk
  /home/ygamretuta/dev/py/django/lib/python2.6/lib-old
  /home/ygamretuta/dev/py/django/lib/python2.6/lib-dynload
  /usr/lib/python2.6
  /usr/lib/python2.6/plat-linux2
  /usr/lib/python2.6/lib-tk
  /home/ygamretuta/dev/py/django/lib/python2.6/site-packages
  /home/ygamretuta/dev/py/django/lib/python2.6/site-packages/PIL
  </code></pre>
  
  <p>I am using Ubuntu 10.10 and this is the uname-a output:</p>
  
  <pre><code>Linux ygam-desktop 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:40:58 UTC 2011 i686 GNU/Linux
  </code></pre>
  
  <p>I am using Python 2.6</p>
  
  <p>I followed the following guides already:</p>
  
  <p><a href="http://appelfreelance.com/2010/06/libjpeg-pil-snow-leopard-python2-6-_jpeg_resync_to_restart/">http://appelfreelance.com/2010/06/libjpeg-pil-snow-leopard-python2-6-_jpeg_resync_to_restart/</a></p>
  
  <p><a href="http://www.jooncode.com/2010/12/02/python-pil-jpeg-resync-restart-error-imaging-module-solve/">http://www.jooncode.com/2010/12/02/python-pil-jpeg-resync-restart-error-imaging-module-solve/</a></p>
  
  <p><a href="http://djangodays.com/2008/09/03/django-imagefield-validation-error-caused-by-incorrect-pil-installation-on-mac/">http://djangodays.com/2008/09/03/django-imagefield-validation-error-caused-by-incorrect-pil-installation-on-mac/</a></p>