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?

David Pashley
  • 23,497
  • 2
  • 46
  • 73

3 Answers3

1

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

David Pashley
  • 23,497
  • 2
  • 46
  • 73
  • 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. –  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
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!

kolypto
  • 11,058
  • 12
  • 54
  • 66
0

sudo pecl install memcache

Cheers

HTTP500
  • 4,833
  • 4
  • 23
  • 31