'.bash_PROFILE: No such file or directory in Mac terminal
When I open my terminal, I get the errors below and can't type new commands. Shutting down and restarting my Mac did not fix the problem. How can I fix this?
-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]
Solution 1:[1]
You need to find out, which file tries to access .bash-PROFILE. Of course you can grep the usual suspects (.profile, .bashrc, .bash_profile etc.), but this does not guarantee that it will show up. If it doesn't, you should produce a trace of what is being performed:
I would first try to open a bash subshell by
bash -li
and look whether the error message shows up again. If it does (likely, but not for sure), repeat this test with
bash -lix
which will show you the culprit. If bash -li does not show the error, I would put a set -x at the beginning of /etc/profile and your ~/.bashrc and open a new terminal.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user1934428 |
