./memcached: error while loading shared libraries: libevent-1.3e.so.1: cannot open shared object file: No such file or directory

About Memcached

Memcached is a high performance caching system which is used by many of the world’s top trafficked websites. Including LiveJournal, Facebook, and many of our own websites. It enables you to save data results that would normally (in most cases) come from a database into memory. This can make your application thousands of times faster. In this post, we will show you how to install memcached on CentOS (or Fedora Core) while overcoming a common obstacle: The libevent.so module not being found.

Installing Memcached on CentOS / Fedora Core

To install memcached on Cent OS without getting the error

./memcached: error while loading shared libraries: libevent-1.3e.so.1: cannot open shared object file: No such file or directory

Run the command

yum install libevent-devel

The complete steps to compiling and installing memcached are as follows:

  1. Make sure you have a GCC Compiler. If not, run
    yum install gcc
  2. Install the libevent dependency
    yum install libevent-devel
  3. Download the latest memcached source from www.memcached.org
    wget “http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
  4. Unzip
    tar zxpfv memcached*
  5. Change directory into unziped dir
    cd memcached*
  6. Configure Memcached
    ./configure
  7. Make and Install
    make install
  8. Run memcached: These values may not work for you but they are just to make sure memcached will run.
    ./memcached -u nobody -m 48 -p 11211
  9. ??
  10. Profit

Tech Comments


Leave a Comment