3

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?

0

3 Answers 3

1

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

2
  • 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, 2009 at 20:51
  • I suspect it would be in /root/tmp/pear/memcache/config.log. Oct 16, 2009 at 22:22
0

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!

1
  • signed? This is Linux, not iPhone. Or I have misunderstood what you've said.
    – Nilesh
    Jul 10, 2011 at 5:49
0

sudo pecl install memcache

Cheers

You must log in to answer this question.