Configure error memcached support requires libmemcached

Creativ-Tech KB

Technology is an Art

Common php compile errors and the corresponding missing lib

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
$ 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 /include/curl/

$ 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

Читайте также:  Ffmpeg http error 403 forbidden

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!
$ 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’
This issue is similar the issue above. however in our case, we are using 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 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

4 thoughts on “ Common php compile errors and the corresponding missing lib ”

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!

cool stuff

Nice Blog, thanks for sharing this kind of information.


Error memcached support requires libmemcached – How to fix

by Sushali Dasan | May 31, 2021

Stuck with “Error memcached support requires libmemcached”? we can help you.

Often while trying to install memcached we may end up with this error. This error is common for both Plesk and cPanel.

Here at Bobcares, we often handle requests from our customers to fix similar errors as a part of our Server Management Services. Today we will see how our support engineers fix this for our customers.

Causes and Fixes for “Error memcached support requires libmemcached”

We will see what causes this error in Plesk as well as cPanel servers along with their fixes.


The error typically looks like the following one in Plesk servers:


The libmemcached-devel package missing.

Steps to fix this error

Following are the steps to fix this error in the Plesk server.

Читайте также:  Fatal error dumping memory

1. First log in to the server via SSH.

2. Then use the following command to install the package depending upon the operating system(OS):




The error typically looks like the following one in cPanel servers:

If Installing memcached from WHM » Software » Module Installers was not successful it triggers the error. A typical error may look like the one given below.

The exact steps for the installation given below:

1.Run the following commands:

2. After installing these components we have to create the following file:

For 32-bit machine

For 64-bit machine

3. Then Run the following commands:

4. Next, we can install libsasl2 using the following command:

5. Then we will install libmemcached using the following command:

6. Now we can run the following to check if is installed into /usr/local/lib/php.ini file. We can add it if is it not.

7. We can check the extension directory that we are using, with the following command:

8. Also, to preserve the module on EasyApache recompiles we have to do the following:

This will create a posteasyapache script that will ensure is copied from /root/ back into the php extension directory.

9. Finally using the following commands we can ensure that the installation was done properly and is complete.

[Still, stuck with the error? We can help you]


In short, we saw how our Support Techs fix “error memcached support requires libmemcached” for our customers.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


Installing PHP Pecl «memcached» error: memcached support requires libmemcached.


Active Member

i was able instal memcach from WHM » Software » Module Installers but wasent that successfull with memcached
i get this error :

and i tried install libmemcached by following these instructions but dindt work :



I suggest using the instructions from the thread when installing Memcache:


Active Member


Well-Known Member

I suggest using the instructions from the thread when installing Memcache:

Unfortunately those instructions no longer work, nor can I post the below to that thread.

This no longer works

Here’s the sequence of steps I’ve completed, somewhat updated for the times, output is from the second pass.

Box: CENTOS 6.6 x86_64 standard – WHM 11.48.1 (build 1)

Everything as root.

Three fails to install memcached:

And a couple near random attempts to find a valid(?) memcached.h

So, any clues on why/what the errors are telling us? And how to get memcached to find a memcached.h it likes?

(And have someone update Tristan’s post with whatever the eventual corrections are.)

Drupal backend development and Drupal fully managed hosting.

NIH Cancer Study: The group supplemented with both vitamins and fenbendazole exhibited significant (P = 0.009) inhibition of tumor growth.



Three fails to install memcached:

# pecl install memcached

configure: error: no, sasl.h is not available. Run configure with —disable-memcached-sasl to disable this check
ERROR: `/root/tmp/pear/memcached/configure —with-libmemcached-dir=no’ failed

Читайте также:  Error opening rtf file

Let us know if the issue persists after running the following command:


Michael, I am also failing to install pecl memcached with the same sasl error. I have been following through Tristan’s guide step by step.

I’ve tried installing cyrus-sasl-devel via yum, as suggested, but this makes no difference when I try to install pecl memcached for php.

If it makes a difference, I installed the latest versions of libevent (2.0.22 stable), memcached (1.4.23) and libmemcached (1.0.18)

I’m running CENTOS 6.6 x86_64 with WHM 11.48.3 (build 0)



Could you verify the exact steps and commands you have taken thus far so we can attempt to reproduce the issue?


Senior Technical Analyst

Please note: EasyApache MemCache is the Apache module rather than the PHP module. We do not list or provide the PHP module there.

When you compile EasyApache with the MemCache Apache module, you end up with it available via Apache only and not via PHP. So here are the steps I just used and this worked.

Senior Technical Analyst


I am aware of this, perhaps this thread was the wrong choice (based on the opening post), but it seems that Michael-Inet diverted the thread away to an alternative issue. I however, found this thread by googling the error listed by Michael-Inet, of which I have the exact same issue, and have follwed the exact same steps.

«checking for sasl/sasl.h. no
configure: error: no, sasl.h is not available. Run configure with —disable-memcached-sasl to disable this check
ERROR: `/root/tmp/pear/memcached/configure —with-libmemcached-dir=no’ failed»

I had no problems downloading, and compiling libevent or memcached (the apache version)

I had no problems creating the 64bit libevent file

I had no problems running ldconfig and starting the memcached server

Installing and building libmemcached went fine.

The only differences between Tristan’s post, and what I downloaded/compiled/installed was the versions of the software, I obviously used the most recent versions, rather than the versions that were recent back in feb 2012).

The issue is when installing the PHP Memcached PECL plugin via the «pecl install memcached» command, or using the PECL GUI in WHM.

When I do this, I get the error relating to SASL.

I have installed Cyrus-Sasl-Devel through yum, as suggested in your reply to Michael-Inet, but this has not resolved the issue.

The SASL error still occurs when attempting to install the PECL memcached classes and functions for PHP.

Actually the SASL error is different now.

It’s found sasl.h but notes that libmemcached was built without sasl support

«checking whether libmemcached supports sasl. no
configure: error: no, libmemcached sasl support is not enabled. Run configure with —disable-memcached-sasl to disable this check
ERROR: `/root/tmp/pear/memcached/configure —with-libmemcached-dir=no’ failed»

I’ve actually resolved the problem.

Cyrus-sasl-devel needs to be installed before libmemcached is compiled.

#cd /path/to/libmemcached src
#make uninstall
#make && make install
#pecl install memcached

Tristans post should be updated to require the installation of SASL prior to the installation of libmemcached


Оцените статью