简体   繁体   中英

php-5.3.17 install memcached memcache extension

centos 6.3 , php-5.3.17, memcached extesion is memcached-2.1.0.tar.gz; And then:

tar -zxvf memcached-2.1.0.tar.gz
cd memcached-2.1.0
./configure --with-php-config=/usr/local/php/bin/php-config
 make

And have error, like this: 在此处输入图片说明

Why??

On Centos 6.3, you can save yourself a lot of time and effort by using a ready-made RPM:

http://pkgs.org/download/php-pecl-memcached

RPMs are also available for up-to-date versions of PHP, MySQL, etc, if you're not already using them.

If you decide to add the Remi repository to your yum configuration, you can add the following line to /etc/yum.repos.d/remi.repo to select the packages you need:

includepkgs=mysql* php*

Looks like you'll need to install libmemcached , as it's dependency for pecl-memcached

sh ~> curl -O https://launchpad.net/libmemcached/1.0/1.0.11/+download/libmemcached-1.0.11.tar.gz
sh ~> tar zvxf libmemcached-1.0.11.tar.gz
sh ~> cd libmemcached-1.0.11
sh ~> ./configure
sh ~> make
sh ~> sudo make install

Also, use the phpize before configuring PECL source files

sh ~> tar zxvf memcached-2.1.0.tar.gz
sh ~> cd memcached-2.1.0
sh ~> phpize
sh ~> ./configure --with-php-config=/usr/local/php/bin/php-config
sh ~> make 
sh ~> make test
sh ~> sudo make install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM