When opening Terminal on Mac system, an error -bash:: command not found was reported.
The error does not affect the use of Terminal, so it is ignored. But after modifying the .bash_profile file, in order to make the configuration effective, using the source command also reported an error -bash:: command not found.
At first I thought it was because the source command could not be found, and I added /bin to the environment variable, but still reported this error.
The problem is in trouble.
Searching on the Internet, I found that most of the problems are similar to -bash:nginx: command not found, that is to say, there is a command between the two ::, but the specific command cannot be found. But the current error report did not see this command, but a space, which means that the space is also regarded as a command, which means that a space is written in .bash_profile, which is considered as a command to be executed by the system.
Open .bash_profile, and no spaces are seen. Copy the contents of the file to a text editor, and no spaces are seen.
In order to troubleshoot, I plan to comment out all the commands, let go of the commands line by line, and then execute the source command to see which line is reporting the error. Found that the workload is too large.
I accidentally opened .bash_profile with VS Code, and found an exception, as follows:
Remove this special character, source again, and no more errors will be reported.
It can be seen that the system executes this special character as a command, but cannot find this command, and this command is displayed as a space in the terminal, which leads to the above error.
- linux Ubuntu Error: No command ‘setenv‘ found
- AFTER THE GIT SOURCE CODE IS INSTALLED, AN ERROR IS REPORTED /USR/BIN/GIT: NO SUCH FILE OR DIRECTORY
- Termux setting path environment variable
- How to Solve Linux Error: -bash: unzip: command not found
- Error in Linux running file: bash: $’\r’: command not found
- Running shell script reports an error: “syntax error near unexpected token solution ‘”
- How to Use Apt get Command Under Mac OSX
- Errors encountered when configuring static ip on Ubuntu 18.04
- Set the cursor of Ubuntu terminal to turn on automatic display
- Shell Script syntax error near unexpected token `done’
- CentOS/RHEL 7: How to Reinstall GRUB2 from Rescue Mode (EFI)
- Anaconda prompt running environment.yml [How to Solve]
- How to Fix error 28 from storage engine
- [Solved] Failed to execute/bin/bash: resource temporarily unavailable
- Windows command execution bypass
- Grep: How to Find All the Files Containing a String in Linux
- Shell: How to Get System Current Tme and Format it
- WPF: How to Reference Font Resource File
- How to Solve Error vim :call CompileRunGcc()
- Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems