bind(): Can't assign requested address

Dave Roe david_roe at mac.com
Mon Nov 22 17:23:03 PST 2004


I am trying to get memcached (1.1.11) running under OS X (10.3).

The first problem I encountered was running "make":

gcc -DHAVE_CONFIG_H -I. -I. -I.    -DNDEBUG -g -O2 -I/include -c 
memcached.c
gcc -DHAVE_CONFIG_H -I. -I. -I.    -DNDEBUG -g -O2 -I/include -c slabs.c
gcc -DHAVE_CONFIG_H -I. -I. -I.    -DNDEBUG -g -O2 -I/include -c items.c
gcc -DHAVE_CONFIG_H -I. -I. -I.    -DNDEBUG -g -O2 -I/include -c assoc.c
gcc -DNDEBUG -g -O2 -I/include -L/lib -o memcached  memcached.o slabs.o 
items.o assoc.o  -levent
ld: warning -L: directory name (/lib) does not exist

Nevertheless, the binary is created. I then proceeded with "sudo make 
install".

/bin/sh ./mkinstalldirs /usr/local/bin
   /usr/bin/install -c  memcached /usr/local/bin/memcached
make  install-man1
/bin/sh ./mkinstalldirs /usr/local/man/man1
  /usr/bin/install -c -m 644 ./doc/memcached.1 
/usr/local/man/man1/doc/memcached.1
install: /usr/local/man/man1/doc/memcached.1: No such file or directory
make[2]: *** [install-man1] Error 71
make[1]: *** [install-man] Error 2
make: *** [install-am] Error 2

Okay, this is just the man page, so I figured I could still proceed, 
but I am unable to start memcached using "sudo /usr/local/bin/memcached 
-l 127.0.0.1 -p 11211 -m 64 -d". It fails with:

bind(): Can't assign requested address
failed to listen

My machine has an internal IP of 10.0.1.160 which I tried. No change. I 
tried various different values for the port. No change. I ran netstat 
but could not see anything which would indicate a port number conflict.

Having scoured the mailing list archives and both Google web and groups 
search, I have been unable to turn up anything which relates to my 
problem. There are a couple of posts which indicate that it does 
install and run under OS X, but it is as if no-one else is experiencing 
this same bind issue.

Does anyone have any experience installing memcached under OS X? Are 
there any tweaks required? Any suggestions on what I should try next?

Thanks,
/dave



More information about the memcached mailing list