views:

672

answers:

2

I'm on Fedora Core 6 (64 bit)

after "yum install libjpeg-devel" I have downloaded and built PIL. It gives the message:

--- JPEG support ok

Looks like JPEG built okay, but when running selftest.py:

IOError: decoder jpeg not available

Why would it appear to have built correctly, but fail the selftest?

+1  A: 

You probably need more packages. Install libjpeg which includes /usr/lib/libjpeg.so* and try again.

On my Fedora (another version), PIL is installed with the python-imaging rpm :

ldd _imaging.so
    linux-gate.so.1 =>  (0x004c6000)
    libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00a07000)
    libz.so.1 => /lib/libz.so.1 (0x00b91000)
    libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x00110000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00ee8000)
    libc.so.6 => /lib/libc.so.6 (0x00260000)
    libdl.so.2 => /lib/libdl.so.2 (0x003c9000)
    libutil.so.1 => /lib/libutil.so.1 (0x00fcd000)
    libm.so.6 => /lib/libm.so.6 (0x00ad1000)
    /lib/ld-linux.so.2 (0x007a1000)

Which means PIL needs libjpeg.so.

gimel
+1  A: 

Turns out this gets solved by completely removing the installed versions of PIL and starting the build again from scratch.

Pinballkid
There was a second error with png formatted images, so for the record, it is helpful to have zlib-devel installed too.
Pinballkid