0

I upgraded my homebrew xdebug from 2.2.6 to 2.2.7, without checking i brew cleanup the previous version, but when i tried to run composer it outputs the following error.

   Failed loading /usr/local/Cellar/php54-xdebug/2.2.6/xdebug.so: dlopen(/usr/local/Cellar/php54-xdebug/2.2.6/xdebug.so, 9): image not found

OS: Mountain Lion, the composer and php54-xdebug are installed via homebrew.

I tried downgrading xdebug but version 2.2.6 is not available in the brew versions php54-xdebug command. Homebrew install specific version of formula?

composer version is 1.0.0-alpha9

Community
  • 1
  • 1
user2432189
  • 153
  • 2
  • 9
  • You can try `brew install --build-from-source php71-xdebug` from this issue: https://github.com/Homebrew/homebrew-php/issues/2518 – Connor Leech Jan 10 '18 at 21:02

1 Answers1

4

It took me awhile to find it, the xdebug extension that is bound to the php.ini file was not updated after the brew upgrade, update the version inside the ext-xdebug.ini from 2.2.6 to 2.2.7

$ php --ini
Configuration File (php.ini) Path: /usr/local/etc/php/5.4
Loaded Configuration File:         /usr/local/etc/php/5.4/php.ini
Scan for additional .ini files in: /usr/local/etc/php/5.4/conf.d
Additional .ini files parsed:      /usr/local/etc/php/5.4/conf.d/ext-apc.ini,
/usr/local/etc/php/5.4/conf.d/ext-xdebug.ini
user2432189
  • 153
  • 2
  • 9