What is the best way to install Memcached ?

nadlerz

Verified User
Joined
Apr 29, 2012
Messages
142
I tried doing this:


[root@server ~]# pecl install memcache
downloading memcache-2.2.6.tgz ...
Starting to download memcache-2.2.6.tgz (35,957 bytes)
..........done: 35,957 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

ERROR: `phpize' failed
But it fail, How to fix ?
 

nadlerz

Verified User
Joined
Apr 29, 2012
Messages
142
Fixed now, another problem:


pecl install memcached
downloading memcached-2.0.1.tgz ...
Starting to download memcached-2.0.1.tgz (39,088 bytes)
..........done: 39,088 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
building in /var/tmp/pear-build-root/memcached-2.0.1
running: /tmp/pear/temp/memcached/configure
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-20060613
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... no
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 disable memcached sasl support... no
checking for ZLIB... yes, shared
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 libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/tmp/pear/temp/memcached/configure' failed

[root@server no-debug-non-zts-20060613]#
How to fix ?
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,793
Location
A Coruña, Spain
Honestly dont know, ive see many thread in this forum about memcached, maybe a search would help you much more :)

Also google should be a good friend ;)

Regards
 

nadlerz

Verified User
Joined
Apr 29, 2012
Messages
142
I'm always searching google, but didn't find any solutions for this prob.
 

nadlerz

Verified User
Joined
Apr 29, 2012
Messages
142
Still encounter an error:



[root@server etc]# chkconfig --add memcached
error reading information on service memcached: No such file or directory
[root@server etc]# ps -e | grep memcached
27083 ? 00:00:02 memcached
[root@server etc]#
 

duntuk

Verified User
Joined
Jan 23, 2007
Messages
49
The problem appears to be that memcached (http://memcached.org/) is NOT installed.

The distribution and package versioning is confusing:

memcached (v1.4.14 / 2012-7-30 ) http://memcached.org/ (official release/source)

memcache (3.0.6 beta / 2011-04-11) : http://pecl.php.net/package/memcache (memcached extension; this is what you're trying to install)

memcached (2.1.0 /2012-08-07) http://pecl.php.net/package/memcached (php extension)


I would say build the official latest release from source
http://code.google.com/p/memcached/wiki/NewInstallFromSource

then install memcached (php extension) 2.1.0 http://pecl.php.net/package/memcached
 
Top