The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing PHP Pecl "memcached" error: memcached support requires libmemcached.

Discussion in 'General Discussion' started by dolomats, Jan 9, 2015.

  1. dolomats

    dolomats Active Member

    Joined:
    Dec 14, 2014
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Hello

    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 :

    # wget https://launchpad.net/libmemcached/1.0/1.0.17/+download/libmemcached-1.0.17.tar.gz
    # tar xvf libmemcached-1.0.17.tar.gz
    # cd libmemcached-1.0.17
    # ./configure
    # make & make install
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,764
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. dolomats

    dolomats Active Member

    Joined:
    Dec 14, 2014
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Hi,
    Thanks for the reply, since last time I was able to install it .
     
  4. Michael-Inet

    Michael-Inet Active Member

    Joined:
    Feb 20, 2014
    Messages:
    32
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    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.


    Code:
    # yum install libevent
    Package libevent-1.4.13-4.el6.x86_64 already installed and latest version
    
    # yum install memcached
    Package memcached-1.4.4-3.el6.x86_64 already installed and latest version
    
    # echo "/usr/local/lib/" > /etc/ld.so.conf.d/libevent-x86_64.conf
    {no output}
    
    # ldconfig
    {no output}
    
    # memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
    {no output}
    
    # cd ~
    # mkdir junk
    # cd junk
    
    Visit:  [url]https://launchpad.net/libmemcached[/url]
    Copy the Download link for the latest version (currently 1.0.18)
    
    # wget [url]https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz[/url]
    # tar -zxf libmemcached-1.0.18.tar.gz
    
    # cd libmemcached-1.0.18
    # ./configure
    # make && make install
    
    ...
    Libraries have been installed in:
       /usr/local/lib
    ...
     /bin/mkdir -p '/usr/local/include/libmemcached'
     /usr/bin/install -c -m 644  libmemcached/memcached.h libmemcached/memcached.hpp libmemcached/util.h '/usr/local/include/libmemcached'
     /bin/mkdir -p '/usr/local/include/libmemcachedutil-1.0'
     /usr/bin/install -c -m 644  libmemcachedutil-1.0/flush.h libmemcachedutil-1.0/ostream.hpp libmemcachedutil-1.0/pid.h libmemcachedutil-1.0/ping.h libmemcachedutil-1.0/pool.h libmemcachedutil-1.0/util.h libmemcachedutil-1.0/version.h '/usr/local/include/libmemcachedutil-1.0'
     /bin/mkdir -p '/usr/local/lib/pkgconfig'
     /usr/bin/install -c -m 644 support/libmemcached.pc '/usr/local/lib/pkgconfig'
    make[2]: Leaving directory `/root/junk/libmemcached-1.0.18'
    make[1]: Leaving directory `/root/junk/libmemcached-1.0.18'
    
    Three fails to install memcached:


    Code:
    # pecl install memcached
    {Hit Enter at prompt}
    
    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
    
    
    
    # pecl install memcached
    {/usr/local/lib
     at prompt}
    
    checking for libmemcached location... configure: error: Unable to find memcached.h under /usr/local/lib
    ERROR: `/root/tmp/pear/memcached/configure --with-libmemcached-dir=/usr/local/lib' failed
    
    
    Through WHM 
    # Software » Module Installers » PHP Pecl Manage
    # Install a PHP Pecl » memcached » Install Now
    
    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
    The memcached.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626
    Tidying /usr/local/lib/php.ini...
    No changes
    Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini...
    No changes
    And a couple near random attempts to find a valid(?) memcached.h

    Code:
    # pecl install memcached
    {/usr/local/include/libmemcached
     at prompt}
    
    checking for memcached msgpack support... disabled
    checking for libmemcached location... configure: error: Unable to find memcached.h under /usr/local/include/libmemcached
    ERROR: `/root/tmp/pear/memcached/configure --with-libmemcached-dir=/usr/local/include/libmemcached' failed
    
    root@srv05 [/usr/local/lib]# ll /usr/local/include/libmemcached/memcached.h
    -rw-r--r-- 1 root root 1713 Feb 26 18:05 /usr/local/include/libmemcached/memcached.h
    
    
    # pecl install memcached
    {~/junk/libmemcached-1.0.18
     at prompt}
    
    checking for libmemcached location... configure: error: Unable to find memcached.h under ~/junk/libmemcached-1.0.18
    ERROR: `/root/tmp/pear/memcached/configure --with-libmemcached-dir=~/junk/libmemcached-1.0.18' failed
    
    # # #

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

    Best,
    Michael

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

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,764
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Let us know if the issue persists after running the following command:

    Code:
    yum install cyrus-sasl-devel
    Thank you.
     
  6. 01i

    01i Member

    Joined:
    Nov 16, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    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)
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,764
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  8. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    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.

    Code:
    # cd /root
    # wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
    # tar -zxvf libmemcached-1.0.18.tar.gz
    # cd libmemcached-1.0.18
    # ./configure
    # make && make install
    # pecl install memcached
    
     
  9. 01i

    01i Member

    Joined:
    Nov 16, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Peter,

    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"


    Michael,

    I have run through all of the steps in Tristan's post in this thread (https://forums.cpanel.net/threads/memcached-instalation-memcached-so-missing.257942/)

    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.

    ...... oooh! ......

    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.

    running

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

    works for me

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

    e.g.

    Next, install libsasl2
    Code:
    yum install cyrus-sasl-devel
    Now, install libmemcached:
    Code:
    cd ~
    wget http://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz
    tar -zxvf libmemcached-1.0.4.tar.gz
    cd libmemcached-1.0.4
    ./configure
    make && make install
    pecl install memcached
    [edit] I also made a post about this in the thread with Tristan's installation guide
     
    #9 01i, Apr 22, 2015
    Last edited: Apr 22, 2015
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,764
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I am happy to see you were able to address the issue. Thank you for providing us with the updated steps you took to complete the installation.
     
Loading...

Share This Page