当我打开终端时,我收到以下错误,无法输入新命令。关闭并重新启动我的Mac并没有解决问题。我该如何解决这个问题?
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
-bash: /Users/HabibAlejalil/.bash-PROFILE: No such file or directory
[Process completed]
答案 0 :(得分:0)
您需要找出哪个文件尝试访问.bash-PROFILE
。当然你可以使用常见的嫌疑人(.profile,.bashrc,.bash_profile等),但这并不能保证它会出现。如果它没有,你应该产生一些正在执行的内容:
我首先尝试按
打开一个bash子shellbash -li
并查看错误消息是否再次显示。如果确实如此(可能,但不是肯定),请使用
重复此测试bash -lix
会告诉你罪魁祸首。如果bash -li
不显示错误,我会在set -x
和/etc/profile
的开头添加~/.bashrc
并打开新终端。