Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this in my /usr/local/:

libevent-1.4.so.2 memcached

When I do this, it will not start: ./memcached -d -u root -m 3900 -p 11211 ./memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

share|improve this question

2 Answers 2

up vote 3 down vote accepted

While I'm sure there is a distribution-native package of memcached for your release available: You need to inform the dynamic linker of the location of shared libraries.

To do so drop your libevent into one of the paths configured in /etc/ld.so.conf (Prefer /usr/local/lib!) while making sure that you don't overwrite an existing version. If you did that, run ldconfig, and verify your library is known to the runtime linker by running ldconfig -p | grep libevent. After that, drop your memcached into /usr/local/bin/ and try running it again.

If that fails, do a ldd /usr/local/bin/memcached and update your question with the results.

share|improve this answer

As it says, you have to have the shared libevent library on the machine, and where the program can find it.

These instructions also details how to get & compile the event library, and then have it installed properly where it can be found. Depending on the platform, it may also be installable via the usual package manager.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.