PECL 安装 xdebug 失败,因为它找到内置的旧 PHP 而不是自制软件的最新版本 [英] PECL install xdebug fails because it finds built-in older PHP instead of homebrew's latest version

查看:49
本文介绍了PECL 安装 xdebug 失败,因为它找到内置的旧 PHP 而不是自制软件的最新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 pecl sudo pecl install xdebug 安装 xdebug,我得到:checking 检查支持的 PHP 版本...配置:错误:不支持.需要 PHP 版本 >= 7.0.0 和 <7.3.0(发现 5.6.30)
我用 homebrew 安装了最新的 PHP v7.2,但是 pecl 找到了过时的 MacOS 内置 PHP 版本,如何让 pecl 找到最新版本?

I'm installing xdebug with pecl sudo pecl install xdebug and I get: checking Check for supported PHP versions... configure: error: not supported. Need a PHP version >= 7.0.0 and < 7.3.0 (found 5.6.30)
I installed the latest PHP v7.2 with homebrew, but pecl finds the outdated MacOS built-in version of PHP, how can I make pecl find the latest version?

推荐答案

你可以试试吗?

pecl -d php_suffix=7.2 install

您也可以尝试更改 pecl 设置:

Also you can try to change pecl settings:

sudo pecl config-set php_ini /etc/php/7.2/cli/php.ini
sudo pecl config-set ext_dir /usr/lib/php/******/
sudo pecl config-set bin_dir /usr/bin/
sudo pecl config-set php_bin /usr/bin/php7.2
sudo pecl config-set php_suffix 7.2

如果没有任何效果,请使用强制:

And in case nothing works use the force:

sudo pecl install -f

这篇关于PECL 安装 xdebug 失败,因为它找到内置的旧 PHP 而不是自制软件的最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆