Ubuntu 11.04 libjpeg.so libpng.so PHP installation issues

I purchased a new laptop today. After about a week of research and looking at various options I decided on an HP DV6-6026TX. So for the laptop has been an absolute joy to work with. The first thing I did was blow away Windows completely and install Ubuntu 11.04. The first thing I discovered was that if you install the genuine ATI graphics drivers, Unity dies. Ubuntu installed straight away and everything I’ve tested (which isnt that much) seems to be working fine.

So, first thing to do is get the machine all setup as a development platform for my study/work. I installed Nginx and then started getting PHP ready to install. Once I was all ready to go I started the ./configure script for PHP. The configuration script fails with warnings about libjpeg.so. I immediately changed my ./configure to have:


Unfortunately this failed as well which did surprise me. My solution to the problem was to create symlinks for both libjpeg.so and libpng.so to the /usr/lib directory and to only have --with-jpeg-dir in my configure script.

In summary, here are the 2 simlinks that were required when building PHP on Ubuntu 11.04 64bit:

ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/libjpeg.so
ln -s /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/libpng.so

2 Replies to “Ubuntu 11.04 libjpeg.so libpng.so PHP installation issues”

  1. I used to use


    But I had the same issue you had

    Looks like installing “libjpeg8-dev” fixes the jpeg issue.

    There doesn’t seem to be a libpng.so file from any of the libpng packages as of right now still.

    I still had to use
    ln -s /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/libpng.so
    to fix png.

    Usually Ubuntu works so well, this is a bit annoying.

  2. Thanks! I ran into the same problem. Mine was 32 bit, so I used

    ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib/libjpeg.so
    ln -s /usr/lib/i386-linux-gnu/libpng.so /usr/lib/libpng.so

Leave a Reply

Your email address will not be published. Required fields are marked *