LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Conmpile error wen compile php:configure: error: libpng.(a|so) not found (https://www.linuxquestions.org/questions/linux-software-2/conmpile-error-wen-compile-php-configure-error-libpng-a%7Cso-not-found-617853/)

tanveer 02-01-2008 01:10 AM

Conmpile error wen compile php:configure: error: libpng.(a|so) not found
 
Hi all,
I am trying to install php-5.2.5 in an 64bit machine and installed RHEL4 ES (update2) and after installing mysql and apache when I give the configure command it gives the below output.
PHP Code:

#./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql --prefix=/usr/local/apache/php \
--
with-config-file-path=/usr/local/apache/php \
--
enable-force-cgi-redirect --with-zlib --with-gettext \
--
with-gdbm --with-gd --with-libpng --with-libxml 

Output:
PHP Code:

....
...
checking for QDBM support... no
checking 
for gdbm_open in -lgdbm... yes
checking 
for GDBM support... yes
checking 
for NDBM support... no
checking 
for Berkeley DB4 support... no
checking 
for Berkeley DB3 support... no
checking 
for Berkeley DB2 support... no
checking 
for DB1 support... no
checking 
for DBM support... no
checking 
for CDB support... no
checking 
for INI File support... no
checking 
for FlatFile support... no
checking whether to enable DBA 
interface... yes
checking whether to enable dbase support
... no
checking whether to enable DOM support
... yes
checking 
for xml2-config path... (cached) /usr/bin/xml2-config
checking whether libxml build works
... (cachedyes
checking whether to enable EXIF 
(metadata from imagessupport... no
checking 
for FrontBase SQL92 (fbsqlsupport... no
checking 
for FDF support... no
checking whether to enable input filter support
... yes
checking pcre install prefix
... no
checking whether to enable FTP support
... no
checking OpenSSL dir 
for FTP... no
checking 
for GD support... yes
checking 
for the location of libjpeg... no
checking 
for the location of libpng... no
checking 
for the location of libXpm... no
checking 
for FreeType 1.x support... no
checking 
for FreeType 2... no
checking 
for T1lib support... no
checking whether to enable truetype string 
function in GD... no
checking whether to enable JIS
-mapped Japanese font support in GD... no
checking 
for fabsf... yes
checking 
for floorf... yes
If configure fails try --with-jpeg-dir=<DIR>
configureerrorlibpng.(a|sonot found

PHP Code:

#rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n" | grep libpng
libpng-1.2.7-1.x86_64
libpng10
-1.0.16-1.x86_64
libpng
-1.2.7-1.i386
libpng10
-1.0.16-1.i386
libpng
-devel-1.2.7-1.x86_64
libpng10
-devel-1.0.16-1.x86_64

# rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n" | grep libjpeg
libjpeg-6b-33.x86_64
libjpeg
-6b-33.i386
libjpeg
-devel-6b-33.x86_64

# rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n" | grep zlib
zlib-1.2.1.2-1.2.x86_64
zlib
-1.2.1.2-1.2.i386
zlib
-devel-1.2.1.2-1.2.x86_64
zlib
-devel-1.2.1.2-1.2.i386 

What is acutally missing and one more thing. Further below are the search results which its cant locate.
PHP Code:

# locate libpng.a
/usr/lib64/libpng.a

# locate libpng.so
/usr/lib64/libpng.so.3.1.2.7
/usr/lib64/libpng.so.3
/usr/lib64/libpng.so
/usr/lib64/libpng.so.2.1.0.16
/usr/lib64/libpng.so.2
/usr/lib/libpng.so.3.1.2.7
/usr/lib/libpng.so.3
/usr/lib/libpng.so.2.1.0.16
/usr/lib/libpng.so.2

# locate libjpeg.so
/usr/lib64/libjpeg.so.62.0.0
/usr/lib64/libjpeg.so
/usr/lib64/libjpeg.so.62
/usr/lib/libjpeg.so.62.0.0
/usr/lib/libjpeg.so.62

# locate libjpeg.a
/usr/lib64/libjpeg.a



bathory 02-01-2008 01:50 AM

Instead of:
Quote:

--with-libpng
you should use
Code:

--with-png-dir=/usr/lib64

tanveer 02-02-2008 08:13 PM

This is the output with the new config but same result
PHP Code:

./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --prefix=/usr/local/apache/php --with-config-file-path=/usr/local/apache/php --enable-force-cgi-redirect --with-zlib --with-gettext --with-gdbm --with-gd --with-png-dir=/usr/lib64 --with-libxml 

PHP Code:

checking whether to enable EXIF (metadata from imagessupport... no
checking 
for FrontBase SQL92 (fbsqlsupport... no
checking 
for FDF support... no
checking whether to enable input filter support
... yes
checking pcre install prefix
... no
checking whether to enable FTP support
... no
checking OpenSSL dir 
for FTP... no
checking 
for GD support... yes
checking 
for the location of libjpeg... no
checking 
for the location o[B]f libpng... /usr/lib64[/B]
checking for the location of libXpm... no
checking 
for FreeType 1.x support... no
checking 
for FreeType 2... no
checking 
for T1lib support... no
checking whether to enable truetype string 
function in GD... no
checking whether to enable JIS
-mapped Japanese font support in GD... no
checking 
for fabsf... yes
checking 
for floorf... yes
If configure fails try --with-jpeg-dir=<DIR>
configureerrorlibpng.(a|sonot found


nileshgr 02-02-2008 10:07 PM

try
Code:

./configure --with-png-dir=/usr --other-options

jigot 08-25-2008 09:53 AM

Same error on RHEL5.0 64bit.

Solution :
'--with-libdir=lib64' and just '--with-png-dir' (instead of --with-png-dir=/usr/lib64')

:)

gorlama 02-03-2009 06:13 AM

Worked fine on Fedora 10 x86_64
Thanks, jigot


All times are GMT -5. The time now is 12:33 PM.