dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac

前端 未结 27 1407
孤城傲影
孤城傲影 2020-11-27 09:02

I installed node using homebrew (Mojave), afterwards php stoped working and if I try to run php -v I get this error:

php -v
dyld: Library not lo         


        
27条回答
  •  野性不改
    2020-11-27 09:52

    Just brew remove php and brew install php did not work, nor did brew reinstall php. My solution was to do:

    brew remove php
    cd /usr/local/Cellar
    rm -rf php/
    brew install php
    brew doctor
    brew cleanup
    

    Now php -v gives me:

    PHP 7.3.2 (cli) (built: Feb 14 2019 10:08:45) ( NTS )
    

提交回复
热议问题