Ask Your Question

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

asked 2017-12-26 05:47:45 -0500

ercan_ros gravatar image

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.

Any advice? Thanks in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-12-26 06:43:04 -0500

gvdhoorn gravatar image

Please see whether #q253480 helps.

edit flag offensive delete link 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.

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

answered 2017-12-26 08:52:02 -0500

ercan_ros gravatar image

updated 2017-12-26 08:57:31 -0500

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-12-26 05:47:45 -0500

Seen: 1,867 times

Last updated: Dec 26 '17