Skip to main content

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

Comments

9 comments

  • cPanelMichael
    Hello :) I suggest using the instructions from the thread when installing Memcache: Memcached Installation Thank you.
    0
  • dolomats
    Hi, Thanks for the reply, since last time I was able to install it .
    0
  • Michael-Inet
    ]Hello :) I suggest using the instructions from the thread when installing Memcache: Memcached Installation Thank you.

    Hi Michael, Unfortunately those instructions no longer work, nor can I post the below to that thread.
    ] Last edited by cPanelTristan; 05-09-2012 at 02:02 AM. Reason: revised to add posteasyapache script

    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.
    # 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: # 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:
    # 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
    # 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.)
    0
  • cPanelMichael
    ]Three fails to install memcached: # 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

    Let us know if the issue persists after running the following command:
    yum install cyrus-sasl-devel
    Thank you.
    0
  • 01i
    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)
    0
  • cPanelMichael
    Could you verify the exact steps and commands you have taken thus far so we can attempt to reproduce the issue? Thank you.
    0
  • cPanelPeter cPanel Staff
    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.
    # 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
    0
  • 01i
    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 (yum install cyrus-sasl-devel
    Now, install libmemcached:
    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
    0
  • cPanelMichael
    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.
    0

Please sign in to leave a comment.