Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install memcache on my VPS. When I type

$ pecl install memcache

I get this error

checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/memcache/configure --enable-memcache-session=yes' failed

Any ideas what the issue could be?

share|improve this question
Hey, accept an answer! :) – kolypto Oct 20 '09 at 10:03

My guess would be check what config.log says. Perhaps you don't have a compiler installed.

share|improve this answer
I am certain I have a compiler installed. I cannot seem to locate the config.log file or I would post that as well. A google search turned up nothing as to where it would be located. Thanks. – smith Oct 16 '09 at 20:51
I suspect it would be in /root/tmp/pear/memcache/config.log. – David Pashley Oct 16 '09 at 22:22

I had such an issue on iPhone, where compiled programs should be signed before they can be run. Make a small test: create a simple helloworld program test.c: #include main() { int number=42; printf("The answer is %i\n", number);

And try to compile it: gcc test.c -o test && ./test

This should fail on your system (that's exactly what "cannot run C compiled programs" stands for!). Consult the on-screen errors and examine what's the reason for this.


share|improve this answer
signed? This is Linux, not iPhone. Or I have misunderstood what you've said. – Nilesh Jul 10 '11 at 5:49

sudo pecl install memcache


share|improve this answer

Your Answer


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