Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

3 Answers 3

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.

Cheers!

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

sudo pecl install memcache

Cheers

share|improve this answer

Your Answer

 
discard

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