我有问题为php 7.1安装memcached的模块。我使用MacOS High Sierra和[email protected]使用自制软件安装。在使用命令安装memcached模块for php期间
pecl install memcached
我收到了错误:
检查zlib位置... configure:错误:memcached支持需要ZLIB。使用--with-zlib-dir =指定ZLIB头和库所在的前缀ERROR:`/ private / tmp / pear / install / memcached / configure --with-php-config = / usr / local / opt / [email protected]/bin/php-config --with-libmemcached-dir'失败了
但我已经安装了zlib。在homebrew存储库中进行更改后,我找不到如何安装memcached模块的方法。
pecl bundle memcached
phpize
brew list zlib
)./configure --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/
(用上一个命令中的一个替换zlib路径)make
make install
/usr/local/etc/php/7.0/conf.d directory in a file called ext-memcached.ini
[memcached]
extension=/usr/local/Cellar/[email protected]/7.0.30_1/pecl/20151012/memcached.so
php -m
应该在输出列表中显示memcached