How to Install Memcached in WHM / CentOS

I use Centos & WHM.
Here is how to install memcached (not memcache) using command line.

First, installing memcached

tar -zxvf memcached-1.x.x.tar.gz
cd memcached-1.x.x
./configure && make && make test && sudo make install

After running the last command, i got this error

checking for libevent directory... configure: error: libevent is required.

You can get it from

If it’s already installed, specify its path using –with-libevent=/dir/

So now i must install libevent

tar xzf libevent-x.x.x-stable.tar.gz
cd libevent-x.x.x-stable
make install

I tried to install memcached again

./configure && make && make test && sudo make install

Now i got a new error :

./sizes: error while loading shared libraries: cannot open shared object file: No such file or directory

Because my system is 64 bit, thanks to Nigel Dunn blog, i run this command :

ln -s /usr/local/lib/ /usr/lib64/

Final step is run the memcached

memcached -d -u nobody -m 512 -p 11211





Leave a Reply

Your email address will not be published. Required fields are marked *