Problem with PHP installation. [with CustomBuild]

SkyPoweR

Verified User
Joined
Jul 21, 2011
Messages
19
Hello,
I am attempting to install on a new fresh VPS Server,
I'm getting a very annoying error, here it is :

Code:
checking for PCRE library location... configure: error: Could not find libpcre.(a|so) in /usr/local
/usr/local/directadmin/custombuild/configure/ap2/configure.php5: line 28: --enable-bcmath: command not found

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file
Thank YOU! :)
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
Hello,

Every line within /usr/local/directadmin/custombuild/configure/ap2/configure.php5 should end with \
except the last one...
 

SkyPoweR

Verified User
Joined
Jul 21, 2011
Messages
19
Thanks for your answer, but,
again :

checking for PCRE library location... configure: error: Could not find libpcre.(a|so) in /usr/local

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file
 

SkyPoweR

Verified User
Joined
Jul 21, 2011
Messages
19
It wasn't, Until this morning, I installed it and rebuilded PHP, still, same error.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
Code:
find / -type f \( -name "libpcre.a" -o -name "libpcre.so" \)
???

Code:
cat /usr/local/directadmin/custombuild/configure/ap2/configure.php5
???
 

SkyPoweR

Verified User
Joined
Jul 21, 2011
Messages
19
For the first one :
it was on /usr/local/lib, i copied it to /usr/local, had another error with ZLIB,
tried to fix it with the directadmin solution here :
http://help.directadmin.com/item.php?id=213
and still,
configure: error: ZLIB extension requires zlib >= 1.0.9
/usr/local/directadmin/custombuild/configure/ap2/configure.php5: line 28: --enable-bcmath: command not found

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file
For the second one :
#!/bin/sh
./configure \
--with-apxs2 \
--with-curl=/usr/local/lib \
--with-gd \
--enable-gd-native-ttf \
--with-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--enable-zip \
--with-iconv \
--with-iconv-dir=/usr/local/lib \
--with-libdir=lib64
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-mbstring
[ --with-libdir=lib64 has not \ on its end because thats what i saw on the solution. =/ ]
 

SkyPoweR

Verified User
Joined
Jul 21, 2011
Messages
19
No,
Still :
configure: error: ZLIB extension requires zlib >= 1.0.9
/usr/local/directadmin/custombuild/configure/ap2/configure.php5: line 28: --enable-bcmath: command not found

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
Your /usr/local/directadmin/custombuild/configure/ap2/configure.php5 should look like

Code:
#!/bin/sh
 ./configure \
 --with-apxs2 \
 --with-curl=/usr/local/lib \
 --with-gd \
 --enable-gd-native-ttf \
 --with-ttf \
 --with-gettext \
 --with-jpeg-dir=/usr/local/lib \
 --with-freetype-dir=/usr/local/lib \
 --with-kerberos \
 --with-openssl \
 --with-mcrypt \
 --with-mhash \
 --with-mysql=/usr \
 --with-mysqli=/usr/bin/mysql_config \
 --with-pcre-regex=/usr/local \
 --with-pdo-mysql=/usr \
 --with-pear \
 --with-png-dir=/usr/local/lib \
 --with-zlib \
 --with-zlib-dir=/usr/local/lib \
 --enable-zip \
 --with-iconv \
 --with-iconv-dir=/usr/local/lib \
 --with-libdir=lib64 \
 --enable-bcmath \
 --enable-calendar \
 --enable-ftp \
 --enable-magic-quotes \
 --enable-sockets \
 --enable-mbstring
 

SkyPoweR

Verified User
Joined
Jul 21, 2011
Messages
19
configure: error: ZLIB extension requires zlib >= 1.0.9

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file

I Verified ZLIB is installed correctly. [Via CustomBuild]

edit:
This fixed my problem!!
ln -sf /usr/lib64/libgssapi_krb5.so.2.2 /usr/lib/libgssapi_krb5.so
ln -sf /usr/lib64/libkrb5.so.3.3 /usr/lib/libkrb5.so
ln -sf /usr/lib64/libk5crypto.so.3.1 /usr/lib/libk5crypto.so
ln -sf /lib64/libcom_err.so.2 /usr/lib/libcom_err.so
ln -sf /usr/lib64/libexpat.so /usr/lib/libexpat.so
ln -sf /usr/lib64/libm.so /usr/lib/libm.so
ln -sf /usr/lib64/libssl.so /usr/lib/libssl.so
Thank you!
 
Last edited:
Top