1

I have recently upgraded my Mac to run PHP 8. I noticed Xdebug was no longer installed, so I tried to install it again but I get the following error:

% pecl install xdebug                 
/usr/local/bin/pecl: line 28: /usr/local/Cellar/php@8.0/8.0.15/bin/php: No such file or directory
/usr/local/bin/pecl: line 28: exec: /usr/local/Cellar/php@8.0/8.0.15/bin/php: cannot execute: No such file or directory

I tried the wizard at https://xdebug.org/wizard, but I can't get phpize installed.

My Mac is running Montery 12.0.1, any idea how I can fix this?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Shaun
  • 173
  • 2
  • 12
  • Does this answer your question? [Can't install xdebug on Mac with Homebrew](https://stackoverflow.com/questions/12712017/cant-install-xdebug-on-mac-with-homebrew) – Nico Haase Feb 15 '22 at 13:48

1 Answers1

0

I had the same error message, I resolved it by reinstalling PHP 8.0 with homebrew as explained in this answer:

brew install php@8.0

Be careful that homebrew with also try to update all dependencies and other packages.

Then pecl worked again and I could install xdebug.

[22:39:40] coil@mac-mini.home:/Users/coil/Sites/strangebuzz.com$ php -v
PHP 8.0.19 (cli) (built: May 12 2022 09:09:32) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.19, Copyright (c) Zend Technologies
    with Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans
    with Zend OPcache v8.0.19, Copyright (c), by Zend Technologies
COil
  • 7,201
  • 2
  • 50
  • 98