configure: error: libjpeg.(a|so) not found.


Well-Known Member
We have two paid licenses. The first installation, on a 32 bit VPS went OK and is running smoothly, no hiccups for months.

The second installation of lsws on a 64 bit dedicated server went fine, but PHP compilation is giving me grief. The server is CentOS 5.4, pretty bare.

configure: error: libjpeg.(a|so) not found.

Yum lists libjpeg:

libjpeg.i386 6b-37 installed
libjpeg.x86_64 6b-37 installed

It's also in /usr/lib - where I added a further symlink to make sure it works:

# ls -l /usr/lib/libj*
lrwxrwxrwx 1 root root 17 Apr 27 16:58 /usr/lib/ ->
lrwxrwxrwx 1 root root 17 Feb 15 13:31 /usr/lib/ ->
-rwxr-xr-x 1 root root 134268 Jan 6 2007 /usr/lib/

This is the config I'm trying:

--with-libdir=lib64 --with-mysql-sock=/tmp/mysql.sock --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv --with-mhash --with-mcrypt --with-mysql --with-pear --with-xml --with-simplexml --with-zlib --with-enable-inline-optimization --disable-debug --with-dom --with-dom-xslt --with-sqlite --with-curl --with-php-soap --with-soap --enable-soap --enable-pdo --with-mysql-pdo --with-pdo-mysql --with-kerberos --with-gif --with-jpeg --with-png --enable-jpg --enable-png --enable-gif --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-litespeed --with-openssl --enable-ftp --enable-calendar --enable-json --with-imap --with-imap-ssl
That's with PHP 5.2.13 - I can't go up to 5.3.latest yet

I also simply tried --with-jpeg-dir=/usr

I actually need mailparse somehow in there too but will leave that for later.

Why isn't it finding libjpeg when it's clearly there?
Last edited:


Well-Known Member
Bloody typical, isn't it. Post that after pulling your hair out and re-reading my own post I notice the with-libdir=lib64

# cd /usr/lib64
# ln -s lib

Now it works. Or at least, on to libpng.

I still wonder though, why the need for this symlinking? Seems like an awful lot of manual labour in order to get it working.

Edit: I'm now stuck on:

make: *** [ext/gd/libgd/gd_jpeg.lo] Error 1
Edit: yum installing a few devel packages further, it now compiles.
Last edited: