libjpeg.(a|so) not found. But it's there!

J.T.

Well-Known Member
#1
Hi,

Trying to compile PHP 5.2.13 on Centos 5.4.

checking for GD support... yes
checking for the location of libjpeg... /opt
checking for the location of libpng... /opt
checking for the location of libXpm... no
checking for FreeType 1.x support... yes
checking for FreeType 2... /usr/include/freetype2
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
configure: error: libjpeg.(a|so) not found.
**ERROR** Could not configure PHP build
Two contradicting lines highlighted.

It mentions opt as I tried this bug workaround:

http://bugs.php.net/bug.php?id=33685&edit=1

libjpeg.so is actually in /usr/lib and even if I say --with-jpeg --enable-jpg --with-jpeg-dir=/usr or even with-jpeg-dir=/usr/lib it just won't compile/configure.

Previous PHP compiles on similar OSes went just fine.

How can it first detect it's in the folder and subsequently think it's not?

# yum install jpeg* says it's installed and latest already...

in /usr/lib where /opt/lib is symlinked to for good measure:

libjpeg.so
libjpeg.so.62
libjpeg.so.62.0.0

One curiosity I noticed is that despite compiling PHP 5.2.13 on Step 3: Preparing for building PHP 5.2.13 Binary it says:

Retrieving LSAPI from http://www.litespeedtech.com/packages/lsapi/php-litespeed-5.3.1.tgz
Extracting LSAPI archive: tar -xzf php-litespeed-5.3.1.tgz
Referencing 5.3.1

This is latest LSWS v 4.0.15 Std on a dev VM.

Any ideas? Thanks.
 

J.T.

Well-Known Member
#5
Still ge tthe same message now I finally tried it with 4.0.16. Both PHP 4.2.13 and 14 don't work, same error. "configure: error: libjpeg.(a|so) not found"

I said earlier it's Centos 5.4 but I believe it's actually 5.5 kernel 2.6.18-194.8.1.el5

It does extract php-litespeed-5.4.tgz as you expected.

Any ideas?
 

NiteWave

Administrator
#6
maybe your server lack of header files of jpeg
#yum search jpeg
libjpeg.i386 : A library for manipulating JPEG image format files.
libjpeg.x86_64 : A library for manipulating JPEG image format files.
libjpeg-devel.i386 : Development tools for programs which will use the libjpeg library.
libjpeg-devel.x86_64 : Development tools for programs which will use the libjpeg library.
to build with php, need
#yum install libjpeg-devel.i386
or
#yum install libjpeg-devel.x86_64
i.e., package with -devel in package name.

run
#rpm -qa|grep jpeg
to check if the -devel- package installed or not.
 
Top