Common php compile errors and the corresponding missing lib
Some of the package only available if you have set up epel for additional yum repo.
configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org
$ yum install sqlite-devel.x86_64
configure: error: freetype-config not found.
$ yum install freetype-devel.x86_64 freetype.x86_64
configure: error: libXpm.(a|so) not found.
$ yum install libXpm-devel.x86_64 libXpm.x86_64
configure: error: jpeglib.h not found.
$ yum install libjpeg-devel.x86_64
or for centOS 6.x
$ yum install libjpeg-turbo.x86_64 libjpeg-turbo-devel.x86_64
configure: error: png.h not found.
$ yum install libpng-devel.x86_64
configure: error: Unable to locate gmp.h
$ yum install gmp-devel.x86_64
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
$ yum install libc-client-devel.x86_64
configure: WARNING: continuing without libevent support
$ yum install libevent-devel.x86_64
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
# you may find that you have the lic-client-devel.x86_64 installed but configure still complains, and it seems, we need
# the i686 version. or we can use –with-libdir=lib64 without install the i686 package
$ yum install libc-client-devel.i686
configure: error: Kerberos libraries not found.
# you find you have the 64bits version installed, but configure still complains
# install the i686 version too or we can use –with-libdir=lib64 without install the i686 package
$ yum install krb5-devel.i686
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
$ yum install libicu-devel.x86_64
configure: error: installation or configuration problem: C++ compiler cannot create executables.
$ yum install gcc-c++.x86_64
configure: error: Cannot find ldap.h
$ yum install openldap-devel.x86_64
configure: error: Cannot find ldap libraries in /usr/lib.
# on our 64 bits system, it needs something still in /usr/lib
# or we can use –with-libdir=lib64 without install the i686 package
$ yum install openldap-devel.i686
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
$ yum install libmcrypt-devel.x86_64
mysql_config not found
# find out where mysql_config is and add –with-mysqli=/usr/bin/mysql_config
configure: error: Cannot find pspell
$ yum install aspell-devel.x86_64
configure: error: Cannot find libtidy
$ yum install libtidy-devel.x86_64
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
$ yum install libxslt-devel.x86_64
configure: error: Please reinstall the BZip2 distribution
$ yum install bzip2-devel.x86_64
configure: error: Cannot find libsphinxclient headers
configure: error: xml2-config not found. Please check your libxml2 installation.
$ yum install libxml2-devel.x86_64
configure: error: Cannot find OpenSSL’s
$ yum install openssl-devel.x86_64
checking for PCRE headers location… configure: error: Could not find pcre.h in /usr
$ yum install pcre-devel.x86_64
configure: error: Please reinstall the libcurl distribution –
easy.h should be in
$ yum install libcurl-devel.x86_64
configure: error: Unable to detect ICU prefix or shared,/usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.
$ yum install icu.x86_64 libicu-devel.x86_64
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
$ yum install gcc-c++.x86_64
checking for libmemcached location… configure: error: memcached support requires libmemcached. Use –with-libmemcached-dir=xxx to specify the prefix where libmemcached headers and library are located
$ yum install libmemcached.x86_64
and add “–with-libmemcached-dir=/usr” to configure cmd
checking for libmemcached location… configure: error: Unable to find memcached.h under /usr
$ yum install libmemcached-devel.x86_64
configure: error: no, libmemcached sasl support is not enabled. Run configure with –disable-memcached-sasl to disable this check
fix: let us go without SASL support by adding “–disable-memcached-sasl”
later we could build a memcached with SASL enabled and revisit this issue
configure: error: Cannot find enchant
$ yum install enchant.x86_64 enchant-devel.x86_64 enchant-aspell.x86_64
configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
fix:
$ yum install mysql-libs.x86_64 mysql-devel.x86_64
configure: error: mysql configure failed. Please check config.log for more information.
conftest.c:36: undefined reference to `pthread_mutexattr_init’
conftest.c:37: undefined reference to `pthread_create’
fix:
This issue is similar the issue above. however in our case, we are using mysql.com latest mysql 5.6.22 RPM and there are something broken in
our env. and our fix is to build php 5.4.36 with the yum mysql client lib and dev lib.
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
$ yum install postgresql-libs.x86_64 postgresql-devel.x86_64
checking for sqlite3 files in default path… not found
configure: error: Please reinstall the sqlite3 distribution
$ yum install sqlite-devel.x86_64
configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
$ yum install net-snmp-devel.x86_64 net-snmp-libs.x86_64
configure: error: Please install pecl/raphf and activate extension=raphf.so in your php.ini
$ yum install php-pecl-raphf-devel.x86_64 php-pecl-propro-devel.x86_64
still can not compile. we may have to leave pecl_http for later using pecl?
configure: WARNING: unrecognized options: –enable-magic-quotes, –with-sqlite
fix: these are no longer valid for php 5.4+, just remove these options.
ext/pecl_http/config.m4:5: warning: file `config9.m4′ included several times
fix: rename it to “http” which is the official ext name, though the downloaded ext file name is pecl_http
Thanks for your personal marvelous posting! I definitely enjoyed reading it, you are a great author.I will make sure to bookmark your blog and will eventually come back down the road. I want to encourage one to continue your great writing, have a nice evening!
hello
cool stuff
thank you
Nice Blog, thanks for sharing this kind of information.