Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libmemcached-1.0.8 make fails in ubuntu lucid

I was trying to make and install libmemcached-1.0.8 from source in ubuntu lucid.I tried these steps

sudo wget http://download.tangent.org/libmemcached-1.0.8.tar.gz
sudo ./configure -prefix=/usr
sudo make

the make command caused this error

In file included from memcached/assoc.c:14:
memcached/memcached.h:18:19: error: event.h: No such file or directory

    In file included from memcached/assoc.c:14:
    memcached/memcached.h:358: error: field ‘notify_event’ has incomplete type
    memcached/memcached.h:380: error: field ‘event’ has incomplete type
    make[1]: *** [memcached/memcached_memcached-assoc.o] Error 1
    make[1]: Leaving directory `/usr/local/src/libmemcached-1.0.8'
    make: *** [all] Error 2

I had installed memcached using

sudo apt-get install memcached

I tried to check where memcached is ,using whereis memcached ..It shows

memcached: /usr/bin/memcached /etc/memcached.conf /usr/include/memcached /usr/share/memcached /usr/share/man/man1/memcached.1.gz

can someone tell me what I should do to correctly make and install this library?

Edit:

as per the suggestion of @sarnold ,I used

sudo apt-get install libevent-dev 

and then

sudo ./configure --prefix=/usr
sudo make
sudo make install

Now ,there are 13 new executables starting with 'mem' in /usr/bin folder

like image 418
damon Avatar asked Jun 14 '12 02:06

damon


1 Answers

event.h is probably provided by libevent-dev. Try sudo apt-get install libevent-dev and re-try your ./configure ; make sequence.

like image 180
sarnold Avatar answered Oct 21 '22 01:10

sarnold