我不得不承认在这里黑暗中摸索。我相当擅长PHP,但我对管理LINUX服务器知之甚少。我需要在我的64位CentOS 6服务器上安装memcached,并且遇到了两个信息丰富的资源
http://boomshadow.net/tech/installs/how-to-install-memcached/
我按照那里的步骤进行了操作,现在memcached守护程序在我的服务器上启动并运行。我仍然需要为memcache安装PHP扩展,所以我尝试了这里解释的步骤
http://boomshadow.net/tech/installs/how-to-install-php-memcache/
这是我得到的输出
[root@xxx ~]# pecl install memcache
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update
pecl.php.net" to update
downloading memcache-3.0.8.tgz ...
Starting to download memcache-3.0.8.tgz (70,523 bytes)
.................done: 70,523 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Enable memcache session handler support? [yes] : yes
building in /var/tmp/pear-build-rootZi8fyR/memcache-3.0.8
running: /var/tmp/memcache/configure --enable-memcache-session=yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... no
checking for gcc... no
configure: error: in `/var/tmp/pear-build-rootZi8fyR/memcache-3.0.8':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
ERROR: `/var/tmp/memcache/configure --enable-memcache-session=yes' failed
[root@xxx
我无法对此秘密 - 这对我来说大部分都是希腊语。我想我已经想到的是,pecl正在寻找一个C编译器来从下载的源代码中构建PHP内存缓存驱动程序而无法找到它。即使这是对的,它对我没什么帮助。
我需要做些什么来使事情正常运作。
答案 0 :(得分:7)
老习惯很难,我猜 - 再次回答我自己的问题。
# yum groupinstall 'Development Tools'
安装包括gcc编译器在内的开发工具。 memcahe.so扩展使用zlib,所以你还需要做
# yum install zlib-devel
答案 1 :(得分:0)
如果你来配置:错误:不,sasl.h不可用。使用--disable-memcached-sasl运行configure以禁用此检查
错误:/var/tmp/memcached/configure --with-libmemcached-dir=no' failed
./configure --enable-memcached-sasl=no
make
make install
pecl install memcached