Problem Description:
The MAC system reports an error – bash:: command not found when opening terminal
Problem analysis:
Error reporting does not affect the use of terminal, so it is ignored. But I’m modifying. Bash_After the profile file, in order to make the configuration effective, use the source command, which also reports an error – bash:: command not found
At first, I thought that the source command could not be found, added/bin to the environment variable, or reported this error
The problem is in trouble
In the online search, we found that most of the problems are similar to – bash: nginx: command not found, that is, there is a command between the two:: but the specific command cannot be found. The current error report does not see this command, but a space. It means that the space is also regarded as a command, which means. Bash_A space is written in the profile, which is considered to be executed by the system as a command
Open. Bash_Profile, no space is seen. Copy the file content to the text editor, and no space is seen
For troubleshooting, we intend to comment out all commands, release the command line by line, and then execute the source command to see which line reports an error. Found that the workload was too heavy
Inadvertently opening. Bash with vs Code_Profile, an exception is found, as follows:
Remove this special character and select source again. No more errors will be reported
It can be seen that the system executes this special character as a command, but the command cannot be found, and the command is displayed as a space in the terminal, so the above error is caused
Summary:
1. We should draw inferences from one instance, see the difference between other people’s problems and our own problems, and compare the problems
2. Pay attention to special characters and try to use a rich text editor, such as vs code
Similar Posts:
- After installing node on MAC, enter node – V to prompt node command not found
- Solve the problem of ADB: command not found on MAC
- macos -bash: yarn: command not found/-bash: cnpm: command not found
- [Solved] Mac install maven Error: zsh: command not found: MVN
- [Solved] JSCH cannot run JAVA bash:java:Command not found.
- How to install “CONDA command not found” in MAC Anaconda
- Mac ADB prompts command not found
- Super detail: command not found: the scratch solution (add the scratch environment variable to Zsh under MAC)
- Bash Shell: Check File Exists or Not [How to Do]
- [Solved] SyntaxError: unexpected character after line continuation character