mac 更改 php 版本 和-bash 命令失效的解决方法

来源:互联网 发布:king crimson 知乎 编辑:程序博客网 时间:2024/05/22 09:38

Mac  PHP 版本更改 比如 PHP7.0.0  mamp

vi .bash_profile


export PATH="/Applications/MAMP/bin/php/php7.0.0/bin:$PATH”

. .bash_profile


-bash 命令失效 修复办法


比如:
-bash: ls :command not found

step1.
在terminal里面输入:
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"

然后命令暂时可以用了,
step2.
赶紧用open -e ~/.bash_profile在文本编辑器里面打开.bash_profile文件:
step3.
更改PATH环境变量设置,添加上这一行,
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"

再保存就没问题了。

0 0
原创粉丝点击