63bus

Active Member
Mar 31, 2007
35
0
156
I previously installed memcached on my WHM 11.44 server using this guide:
crybit.com/easy-way-to-install-memcached-and-memcache-in-a-cpanel-server/
It was not working correctly - see other question here:
Memcached + Apache 2.2 crashes site every 5-10 minutes
I also found this guide:
internetlifeforum.com/linux-forums/1884-install-memcache-memcached-whm-linux-centos-server/

Step 3 from that guide:
WHM / Software / Module Installers / PHP Pecl / search for memcache and install memcache + memcached

When I go into Module Installers and search on memcache, I get these results:
Code:
memcache     3.0.8     memcached extension    
memcached     2.2.7     PHP extension for interfacing with memcached via libmemcached library
Clicking on the memcache 3.0.8 Install link gives me this:
Code:
pecl/memcache is already installed and is the same as the released version 2.2.7
install failed
extension memcache.so installed in /usr/local/lib/php.ini
Tidying /usr/local/lib/php.ini...
No changes
Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini...
No changes
Ok, it's already installed. Except for the fact that I clicked on the memcache v3.0.8 link and it checked for the memcached 2.2.7 installation?

Clicking on the memcached 2.2.7 Install link gives me this:
Code:
downloading memcached-2.2.0.tgz ...
Starting to download memcached-2.2.0.tgz (70,449 bytes)
.................done: 70,449 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
libmemcached directory [no] : building in /root/tmp/pear/pear-build-rootBeKdHS/memcached-2.2.0
running: /root/tmp/pear/memcached/configure --with-libmemcached-dir=no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... invalid
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... no
checking whether to enable memcached json serializer support... no
checking whether to enable memcached msgpack serializer support... no
checking whether to enable memcached sasl support... yes
checking whether to enable memcached protocol support... no
checking for ZLIB... yes, shared
checking for pkg-config... /usr/bin/pkg-config
checking for zlib location... /usr
checking for session includes... /usr/local/include/php
checking for memcached session support... enabled
checking for memcached igbinary support... disabled
checking for memcached msgpack support... disabled
checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=

[INDENT]to specify the prefix where libmemcached headers and library are located
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-20100525
Tidying /usr/local/lib/php.ini...
No changes
Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini...
No changes
[/INDENT]

From the above:
Code:
The memcached.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20100525
Yes, it is!
Code:
# ls -la /usr/local/lib/php/extensions/no-debug-non-zts-20100525
-rwxr-xr-x 1 root root 186111 Nov  1 21:09 eaccelerator.so
-rw-r--r-- 1 root root 245383 Nov  1 21:08 memcache.so
What's wrong?


Also:
It sounds like I need to install libmemcached.
Pecl searching for libmemcached produces no results found.
Do I need to install that manually, similar to what I found in this post from 2012:
Memcached instalation, memcached.so missing

Thank you for any advice.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Do I need to install that manually, similar to what I found in this post from 2012:
Hello :)

Yes, I suggest using the instructions from the thread that you referenced:

Memcached Installation

Thank you.
 

63bus

Active Member
Mar 31, 2007
35
0
156
Make && make install of this step fails
Code:
cd ~
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
Code:
make -j17  all-am
make[1]: Entering directory `/root/libmemcached-1.0.18'
  CXX      libhashkit/libhashkit_libhashkit_la-aes.lo
  CXX      libhashkit/libhashkit_libhashkit_la-algorithm.lo
  CXX      libhashkit/libhashkit_libhashkit_la-behavior.lo
  CXX      libhashkit/libhashkit_libhashkit_la-crc32.lo
  CXX      libhashkit/libhashkit_libhashkit_la-digest.lo
  CXX      libhashkit/libhashkit_libhashkit_la-encrypt.lo
  CXX      libhashkit/libhashkit_libhashkit_la-fnv_32.lo
  CXX      libhashkit/libhashkit_libhashkit_la-fnv_64.lo
  CXX      libhashkit/libhashkit_libhashkit_la-function.lo
  CXX      libhashkit/libhashkit_libhashkit_la-has.lo
  CXX      libhashkit/libhashkit_libhashkit_la-hashkit.lo
  CXX      libhashkit/libhashkit_libhashkit_la-jenkins.lo
  CXX      libhashkit/libhashkit_libhashkit_la-ketama.lo
  CXX      libhashkit/libhashkit_libhashkit_la-md5.lo
libhashkit/md5.cc: In function 'void Encode(unsigned char*, UINT4*, unsigned int)':
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:377: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc: In function 'void MD5Update(MD5_CTX*, const unsigned char*, unsigned int)':
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
libhashkit/md5.cc:230: warning: assuming that the loop counter does not overflow
  CXX      libhashkit/libhashkit_libhashkit_la-murmur.lo
  CXX      libhashkit/libhashkit_libhashkit_la-murmur3.lo
  CXX      libhashkit/libhashkit_libhashkit_la-murmur3_api.lo
  CXX      libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo
  CXX      libhashkit/libhashkit_libhashkit_la-str_algorithm.lo
  CXX      libhashkit/libhashkit_libhashkit_la-strerror.lo
  CXX      libhashkit/libhashkit_libhashkit_la-string.lo
  CXX      libhashkit/libhashkit_libhashkit_la-nohsieh.lo
  CXXLD    libhashkit/libhashkit.la
  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 `/root/libmemcached-1.0.18'
make: *** [all] Error 2
 
Last edited:

63bus

Active Member
Mar 31, 2007
35
0
156
Maybe this is the issue?
libmemcached requires version gcc-4.2 or better
https://bugs.launchpad.net/libmemcached/+bug/1076181

My system
Code:
gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-55)
yum update gcc tells me
No Packages marked for Update

Options?