Okay, so I had an earlier problem with PIL that is still unresolved. Someone else had this problem and had success by removing the old JPEG library. I can\'t really do that on m
There is a way, but since it is a different version of the jpeg library, you are likely going to break whatever it is that is getting to load the old library first.
The problem likely is that you are loading PHP into the same Apache installation and it is preloading a PHP extension module which has a dependency on the older version of the jpeg library. Because PHP is taking precedence over what Python gets to do, you are stuck with that wrong library.
So, try disabling mod_php so it isn't loaded into Apache. If your problem goes away you know it is that. If it does work and you don't need PHP then leave it permanently disabled. If you do need PHP, then change to using PHP under fastcgi instead, that way you avoid PHP being loaded into Apache processes themselves. Alternatively, you will need to update/rebuild PHP to use the same jpeg version.
Now for the hack to preload the different version of jpeg library, but that likely will not work or cause later problems. This hack is to change the init scripts for Apache such that it sets:
LD_PRELOAD=/some/path/libjpeg.so.8.0.0
export LD_PRELOAD
This tells operating system to preload that library into process address space before it does anything.
BTW, if it is PHP, the reason you aren't finding it with ldd is that the PHP extension modules are installed in a different directory to where the Apache module is.