【发布时间】:2017-11-14 09:13:21
【问题描述】:
我目前正在尝试在我的 Mac 上安装 PHP 7.1。我按照本指南成功安装并链接了php71 https://developerjack.com/blog/2016/08/26/Installing-PHP71-with-homebrew/
但是,当从终端运行 php -v 时(重新启动计算机后,运行 source bashprofile 等后),我仍然得到 PHP 5.6.30 (cli)。有没有办法让终端使用brews install而不是mac自带的版本?
【问题讨论】:
-
让
/usr/local/bin在你的路径中排在第一位(在 .bashrc 中这样做)。 -
阅读 bash_profile vs bashrc 以确保您实现最终目标。
标签: php macos terminal homebrew