Issue
When I install xdebug using pecl sudo pecl install xdebug
I get the following message: checking Check for supported PHP versions... configure: error: not supported . PHP version >= 7.0.0 and < 7.3.0 (found 5.6.30)
I installed the latest PHP v7.2 with Homebrew, but pecl detects an older MacOS embedded version of PHP. How can I force pecl to detect the latest version?
Solution
Can you try?
pecl -d php_suffix=7.2 install <package>
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
Answered By - Andrei Lupuleasa
Answer Checked By - David Goodson (Easybugfix Volunteer)