# bash: /opt/ros/lunar/setup.bash: No such file or directory

Dear Users;

I installed Ros Lunar distro before. After that I decided to switch to Kinetic. Therefore, I remove Lunar from the terminal, and then installed ROS Kinetic. However; I still have this problem: "bash: /opt/ros/lunar/setup.bash: No such file or directory"

I can not find where is this file. In the opt directory, there is no lunar, because I already deleted it. And I can't find that comment file to fix that source file that is reading that comment.

edit retag close merge delete

Sort by » oldest newest most voted

more

Dear @gvdhoorn; Yes, I already searched before and I already seen that page. However, even though I tried what it was said there, it didn't fix the problem. Later I found this, and it fixed the problem: Dear @gvdhoorn, thank you for your response.

( 2017-12-26 08:43:54 -0500 )edit

Problem solved: I have tried #q253480 , but it didn't fix the problem (because \$HOME gives that error which is mentioned on that page:"error bash: HOME/.bashrc: No such file or directory" ).

I found that, this fixed the problem: go to terminal, execute gedit ~/.bashrc. On the bottom of the file, there are those commands which is for setting bash. Delete the corresponding command there(source /opt/ros/lunar/setup.bash - it is lunar in this case, but it might differ which ROS distro you use) in the file, and save and exit the file. When you open the terminal again, that error doesn't appear there, it is fixed.

more