bash: /opt/ros/kinetic/ setup.bash : there is no file or directory

I installed ROS Melodic version, but I used the installation tutorial of “Kinetic” version. As a result, I forgot to change “Kinetic” into “Melodic” in the tutorial by using the echo command when adding environment variables at one step, so the following phenomena occurred:

An error occurred when I source ~/.bashrc
Bash:/opt/ros/kinetic/setup. Bash: no files or directories

After looking, I use the command
tlf@tanglifan:~$ gedit ~/.bashrc

At the bottom of a add error source: the source/opt/ros/kinetic/setup. Bash
Delete it and save it. It’s back to normal.

Read More: