mac php 版本更改 比如 php7.0.0 mamp
vi .bash_profile
export PATH="/Applications/MAMP/bin/php/php7.0.0/bin:$PATH”
. .bash_profile
-bash 命令失效 修复办法
立即学习“PHP免费学习笔记(深入)”;
比如:
-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"
再保存就没问题了。
以上就介绍了mac 更改 php 版本 和-bash 命令失效的解决方法,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号