Can't install xdebug on Mac with Homebrew

前端 未结 11 808
小蘑菇
小蘑菇 2020-12-24 01:31

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 xd         


        
11条回答
  •  失恋的感觉
    2020-12-24 01:34

    macOS 10.14 Mojave, Homebrew, PHP 7.3, April 2020

    The description given in the following article was the only thing I could get to work on macOS 10.14 Mojave with Homebrew to install PHP 7.3 with working xdebug:

    brew list | grep php | awk '{ print "brew uninstall --force "$1}' | bash        # Remove any old version of php.
    rm -rf /usr/local/Cellar/php                                                    # To be sure, manually remove the php cellar folder.
    brew untap homebrew/php                                                         # Then clean any php tap (extra repo).
    brew cleanup                                                                    # Cleanup and Update your brew.
    brew update
    brew install php                                                                # Install the latest version of php.
    pecl uninstall xdebug                                                           # Clean up old xdebug.
    pecl install xdebug-beta                                                        # Install the latest version of xdebug-beta (The xdebug is not compatible with 7.3 so you need to use the xdebug-beta).
    php -v                                                                          # Should now say "with Xdebug v2.9.4, Copyright (c) 2002-2020, by Derick Rethans"
    

提交回复
热议问题