当我打开终端时,出现以下错误,并且无法键入新命令。关闭并重新启动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]
1条答案
按热度按时间yeotifhr1#
你需要找出试图访问
.bash-PROFILE
的文件。当然你可以对常见的可疑文件(.profile,.bashrc,.bash_profile等)进行grep,但这并不保证它会出现。如果它没有出现,你应该生成一个跟踪文件来显示正在执行的操作:我首先尝试通过以下命令打开bash子shell
并查看错误消息是否再次出现。如果出现(可能,但不确定),请使用
如果
bash -li
没有显示错误,我会在/etc/profile
和~/.bashrc
的开头放一个set -x
,然后打开一个新的终端。