I'm trying to install [memcached-1.2.8-repcached-2.2.1]( http://sourceforge.net/projects/repcached/files/latest/download?source=files)

And I have the following error after running the make command:

make all-recursive

make[1]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1'

Making all in doc

make[2]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1/doc'

make[2]: Nothing to be done for `all'.

make[2]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1/doc'

make[2]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1'

gcc -DHAVE_CONFIG_H -I. -DNDEBUG -g -O2 -MT memcached-memcached.o -MD -MP -MF .d> eps/memcached-memcached.Tpo -c -o memcached-memcached.o test -f 'memcached.c' || echo './'memcached.c

memcached.c: In function ‘add_iov’:

memcached.c:697: error: ‘IOV_MAX’ undeclared (first use in this function)

memcached.c:697: error: (Each undeclared identifier is reported only once

memcached.c:697: error: for each function it appears in.)

make[2]: *** [memcached-memcached.o] Error 1

make[2]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1'

make: *** [all] Error 2

OS : Centos5.7 64bit




Note : Memcached and memcache extension for php are already installed

root@server[~]# memcached -h

memcached 1.4.5

php ext http://pecl.php.net/get/memcache-2.2.6.tgz

  • Have you tried yum install memcached ...? – KM. Jan 26 '12 at 18:40
  • @KM01 memcached is already installed and the memcache extension for php also. My Problem within memcached-repcached – Linuxstartway Jan 26 '12 at 19:13
  • Oops, sorry, my bad. – KM. Jan 26 '12 at 19:40

I had the same problem and this is one of the top results in Google, so was forced to do some digging and testing.

Finally I managed to get it to work. The trick is to install libevent1 not libevent2.

In ubuntu I did:

sudo apt-get install libevent1-dev

I had also previously installed the default libevent-dev which is libevent2, so I purged this:

sudo apt-get remove --purge libevent-dev

I have a feeling this may be a bit late for the original poster, but may hopefully help someone else out there.

  • You are great, Thank a lot. – Linuxstartway Apr 2 '12 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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