PHP 擴展安裝

以安裝Redis擴展爲例php

wget http://pecl.php.net/get/redis-4.0.0.tgz
tar  -zxvf redis-4.0.0.tgz
cd redis-4.0.0.tgz
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install

問題解決git

  • libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6

參考鏈接:https://github.com/phpredis/phpredis/issues/784github

git clone https://github.com/phpredis/phpredis.git
cd phpredis/
git checkout php7
rm -f aclocal.m4
phpize
aclocal && libtoolize --force && autoreconf
./configure --with-php-config=/usr/bin/php-config && make
# in my case previous make command installed the redis.so into ~/phpredis/modules/ 
make install #optional
相關文章
相關標籤/搜索