How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

January 28, 2013

Centos 6 pecl install memcached error

Filed under: Linux — Tags: , , , — admin @ 5:50 pm

Today I try to install memcached on a server with centos 6. So basically when I hit
pecl install memcached
I get a lot of errors
checking for libmemcached location... configure: error: memcached support requires libmemcached 1.0.x. Use --with-libmemcached-dir= < DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/var/tmp/memcached/configure' failed

So if I try to install libmemcached by using
yum install libmemcached libmemcached-devel
I see that version of libmemcached will be smaller then 1.0.x

So to install it
cd /usr/local/src
wget https://launchpad.net/libmemcached/1.0/1.0.15/+download/libmemcached-1.0.15.tar.gz
tar -zxvf libmemcached-1.0.15.tar.gz
cd libmemcached-1.0.15
./configure
make
make install

After this try
pecl install memcached

For me this was the working version.

9 Comments »

  1. This article save may day.

    Comment by Font Ocean — February 11, 2013 @ 5:56 pm

  2. worked for me on centos 6.4
    I was following this tutorial
    http://www.howtoforge.com/how-to-use-multiple-php-versions-php-fpm-and-fastcgi-with-ispconfig-3-centos-6.3-p3

    couldnt get past page 3 until I found your post

    THANKS!!!

    Comment by doughahn56 — May 1, 2013 @ 6:23 am

  3. Saved me as well. Thanks!

    Comment by Steve — September 4, 2013 @ 8:35 pm

  4. Glad to hear that my posts help other .

    Comment by admin — September 4, 2013 @ 8:53 pm

  5. legend my friend

    Comment by Gordo — December 18, 2013 @ 1:58 pm

  6. if you came accross configure: error: no, sasl.h is not available. Run configure with –disable-memcached-sasl to disable this check
    ERROR: `/var/tmp/memcached/configure –with-libmemcached-dir=no’ failed

    ./configure –enable-memcached-sasl=no
    make
    make install

    pecl install memcached

    Comment by Sudhir — June 1, 2014 @ 1:41 pm

  7. Doesn’t work now. “make” command gives this error:

    ….
    CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
    In file included from ./libmemcached/common.h:114,
    from ./libmemcached/csl/common.h:50,
    from libmemcached/csl/context.cc:38:
    ./libmemcached-1.0/memcached.h:46:23: error: cinttypes: No such file or directory
    make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
    make[1]: Leaving directory `/usr/local/src/libmemcached-1.0.18′
    make: *** [all] Error 2

    Do I tried “yum install libmemcached”, which worked, but I don’t know where the path is!

    Comment by Phoenix Hunter — August 7, 2014 @ 5:51 pm

  8. Hello
    Are you on centos 6 ?

    Comment by admin — December 16, 2014 @ 2:04 pm

  9. Thenk you

    Comment by MahmutBest — September 5, 2014 @ 7:47 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress