You can step by step debug this problem with starting to check what it is inside the /usr/local/Cellar/php/8.0.0_1
folder running
$ cd /usr/local/Cellar/php/8.0.0_1
$ la -la
I tend to say that there is a pecl
symlink already existing which is why pecl
cannot create a folder there.
Then you should check where pecl
is installed by running which pecl
which ideally gives you /usr/local/bin/pecl
which should point to somewhere /usr/local/Cellar/php/8.0.0_1/bin/pecl
.
If that is the case you can remove the /usr/local/Cellar/php/8.0.0_1/pecl
symlink with
$ rm /usr/local/Cellar/php/8.0.0_1/pecl
and try to reinstall xdebug.
Now fixing the image not found
issue
This comes from an incorrect configuration during the xdebug installation.
First, check what the path to your php.ini
file is by running ˋphp —-iniˋ.
Then open the file and check the First line if there is your xdebug Extension loaded. If yes, remove it there. Then add a file xdebug.conf in the conf.d
folder and add the following:
;XDebug
zend_extension="/usr/local/Cellar/php/8.0.0/pecl/CHANGEME/xdebug.so"
xdebug.remote_autostart=1
xdebug.remote_port=9000
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir="/tmp"
Please check that you have the correct path to your xdebug.so file and that the output dir exists.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…