-1

I've installed libevent on my server in the directory root/data/ and have i'm about to install memcached with

./configure –with-lib-event=/data/; make; make install

However, after running a bit I get this error saying i'm pointing to the wrong directory for libevent.

checking for libevent directory... configure: error: libevent is required.  You can get it from http://www.monkey.org/~provos/libevent/

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

make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

Any suggestions. I am not experience with cli so anything is help. Thanks!

  • Libevent probably is not in /data/. You could try to run configure without the flag and it will often look in default locations. If that doesnt work, then supply a path, but make sure its the path to the libevent header files. – datasage Jun 23 '11 at 00:15
  • 2
    Why not install memcached using your server's package manager? This will save you a lot of time and effort. People more intimately involved with compiling software have already done most of the work for you. – Sgaduuw Jul 21 '14 at 10:27
  • "root/data/" is a relative path - do you mean "/root/data/"? "/data/" ? Something else? – symcbean Jun 29 '23 at 11:49

2 Answers2

0

Run:

find /lib /usr/lib /usr/local/lib | grep -i libevent.so

Then use directory it finds libevent.so as configuration parameter.

Aleksey Korzun
  • 276
  • 1
  • 4
0

To actually install memcached & libevent from source, which I don't recommend unless you're building Linux from Scratch or developing those applications (obviously that is not your case):

  1. Become root with something like sudo su
  2. Navigate to your home folder cd ~/
  3. Download libevent sources wget https://github.com/libevent/libevent/archive/release-2.1.6-beta.tar.gz
  4. Unpack them & go to the resulting dir tar xzvf release-2.1.6-beta.tar.gz && cd libevent-release-2.1.6-beta
  5. Run the following commands to prepare sources: libtoolize, then autoreconf, then automake --add-missing and finally autoreconf again.
  6. Configure them with the following command: ./configure --prefix=/usr --disable-dependency-tracking --disable-silent-rules --disable-samples --disable-debug-mode --disable-malloc-replacement --enable-openssl --disable-static --disable-libevent-regress --enable-thread-support
  7. Finally make && make install
  8. Go back to your home dir cd ~/
  9. Download memcached sources: wget https://memcached.org/files/memcached-1.4.31.tar.gz
  10. Unpack them & navigate to their directory tar xzvf memcached-1.4.31.tar.gz && cd memcached-1.4.31
  11. Configure with the following command: ./configure --prefix=/usr --disable-dependency-tracking --disable-silent-rules --disable-docs --disable-sasl
  12. make && make install

That will get you memacached. Though again you really should consider stopping whatever your are trying to do & install memcached from your system repository. Try this commands with & without adding sudo before them: yum install memcached, apt-get install memcached, yast2 -i memcached

Anubioz
  • 3,677
  • 18
  • 23