几天来,我一直在尝试安装php扩展。
试着用啤酒拿这个..。
$ brew install php71-redis
Error: No available formula with the name "php71-redis"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.尝试用PECL安装然后得到这个..。
$ sudo pecl install redis
downloading redis-4.1.0.tgz ...
Starting to download redis-4.1.0.tgz (220,774 bytes)
..............................................done: 220,774 bytes
25 source files, building
running: phpize
Configuring for:
PHP Api Version: 20160303
Zend Module Api No: 20160303
Zend Extension Api No: 320160303
************
************
checking whether to enable igbinary serializer support... yes
checking whether to enable lzf compression... yes
checking use system liblzf... no
checking for igbinary includes... configure: error: Cannot find igbinary.h
ERROR: `/private/tmp/pear/install/redis/configure --with-php-config=/usr/bin/php-config --enable-redis-igbinary=нуы --enable-redis-lzf=yes' failed最后试图安装igbinary.h ..。
$ sudo pecl install igbinary
downloading igbinary-2.0.7.tgz ...
Starting to download igbinary-2.0.7.tgz (73,523 bytes)
************
************
Build process completed successfully
Installing '/usr/include/php/ext/igbinary/igbinary.h'
ERROR: failed to mkdir /usr/include/php/ext/igbinary发布于 2019-10-03 13:21:41
我刚在MacOS10.13上做了这个(我还在使用)。
有了自制php7.2和更高版本,现在默认情况下,pecl与php二进制文件一起安装。
要查看这一点,请输入which pecl。
安装的步骤
pecl以查看选项。pecl install redis 5.0.2。(或你的版本)。如果您不确定,请对每个问题输入“否”。/usr/local/lib/php/pecl/20180731/redis.so中创建的新文件extension="redis.so"添加到php的顶部。通过打开文件/usr/local/etc/php/7.3/php.ini来检查这一点。(假设你在7.3级)brew services restart php。php -i | grep RedisRedis Support => enabled
Redis Version => 5.0.2这是在2019年9月做的,对我来说很管用。
发布于 2018-08-31 07:21:33
为此,请尝试禁用OSx (Mac)上的csrutil:
csrutil disable中应该行得通。
https://stackoverflow.com/questions/51307311
复制相似问题