我目前正在试图让PHP 7.1我的Mac上。我遵循本指南,并成功安装和链接php71 https://developerjack.com/blog/2016/08/26/Installing-PHP71-with-homebrew/如何让Mac的终端使用Brew的PHP版本?
但是,当从终端运行php -v(重启计算机后,运行源bashprofile等)后,我仍然得到PHP 5.6.30(cli)。有没有办法让终端使用brews install来代替mac自带的版本?
我目前正在试图让PHP 7.1我的Mac上。我遵循本指南,并成功安装和链接php71 https://developerjack.com/blog/2016/08/26/Installing-PHP71-with-homebrew/如何让Mac的终端使用Brew的PHP版本?
但是,当从终端运行php -v(重启计算机后,运行源bashprofile等)后,我仍然得到PHP 5.6.30(cli)。有没有办法让终端使用brews install来代替mac自带的版本?
各种方法:
谢谢。我把我的.bash_profile打开,在usr/bin之前检查usr/local/bin,并且做到了这一点。我不确定这是做这件事的最好方式,但首先做最具体的事情可能是有意义的。 – Guybrush
化妆'在/ usr /本地/ bin'来先在你的路径(做,在.bashrc中)。 – YvesLeBorg
了解** [.bash_profile中VS bashrc中](https://www.google.ca/search?q=bash_profile+vs+bashrc&oq=bash_provile+vs+&aqs=chrome.1.69i57j0l5.5015j0j7&sourceid=chrome&ie=UTF-8) **确定你达到了你的最终目标。 – YvesLeBorg