安装PHP Memcache模块的问题

我正尝试在我的VPS上安装memcache。 当我input

$ pecl install memcache 

我得到这个错误

 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 

任何想法可能是什么问题?

我的猜测是检查什么config.log说。 也许你没有安装编译器。

我在iPhone上遇到过这样的问题,编译的程序在运行之前应该先进行签名。 做一个小testing:创build一个简单的helloworld程序test.c#include main() { int number=42; printf("The answer is %i\n", number);
}
#include main() { int number=42; printf("The answer is %i\n", number);
}

并尝试编译它: gcc test.c -o test && ./test

这应该在你的系统上失败(这正是“不能运行C编译的程序”所代表的!)。 查阅屏幕上的错误,并检查这是什么原因。

干杯!

sudo pecl安装memcache

干杯