I'm kind of new to using Homebrew, but I love it. It's so easy. I'm trying install Xdebug. Some of the posts on the web say to do this:
brew install xdebug
But it doesn't work. I get: Error, no available formula.
I did brew search xdebug
and it returned:
josegonzalez/php/php53-xdebug josegonzalez/php/php54-xdebug
I tried several different iterations of brew install
with this including brew install php53-xdebug
, but still no luck. Can someone help me? I can't find anything on Xdebug's site about using Homebrew, but yet posts on the web seem to indicate it's possible.
Add this repository: https://github.com/josegonzalez/homebrew-php#readme
Then use
brew install php54-xdebug
for PHP 5.4Or
brew install php53-xdebug
for PHP 5.3Or
brew install php55-xdebug
for PHP 5.5This is my solution! Try it! ;)
1 Install developer tools:
2 Instal Autoconf. This is a tool for producing shell scripts that automatically configure software
3 If you use PHP >5.6
Have fun ;)
It looks like the repo moved, but it is available here, complete with instructions on how to access it from Homebrew.
If you get this error after adding the tap and installing:
it is because josegonzalez/php has been moved to homebrew-php/php recently, so you will face the previous error.
The idea is pretty simple, remove the old deprecated repo josegonzalez/php
See the source of this solution to fix any other related bugs.
As homebrew removed the extra php repository containing a version with xdebug already installed, you have to install it manually.
Summary:
brew install
for phppecl install
for xdebugFull example:
The
pecl install xdebug
step above ended withSo I didn't even need to enable the
xdebug.so
inphp.ini
.I'd found this page while googling how to install xdebug for
php 7.1
on osx, and I've decided to leave here my solution:Maybe it'll be helpful for someone else in future...