Ask Your Question

bash: setup.bash: No such file or directory

asked 2015-12-31 03:16:51 -0600

ptreyesguy gravatar image

updated 2016-01-03 05:28:19 -0600

gvdhoorn gravatar image

Following the instructions in Chap 3 of Learning Robotics Using Python (Ubuntu 14.04), I added the ROS workspace path.

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

When starting a new terminal I get the message in the question line. Is anything wrong? Chet

edit retag flag offensive close merge delete


Have you run catkin make in the workspace yet ? Does the file setup.bash exist in your workspace, and is that the correct path to it ?

nickw gravatar image nickw  ( 2015-12-31 04:01:50 -0600 )edit

nickw: 1. I ran catkin make 2. setup.bash is in /opt/ros/indigo but I don't know how to determine whether it is in my workspace

ptreyesguy gravatar image ptreyesguy  ( 2015-12-31 22:50:09 -0600 )edit

the line added to the .bashrc file is trying to read a file ~/catkin_ws/devel/setup.bash

Error is the file is not there. you don't have a workspace set up, different name than catkin_ws, or location. More on setting up

nickw gravatar image nickw  ( 2016-01-01 04:14:55 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2016-01-02 16:11:29 -0600

dchang0 gravatar image

updated 2016-01-03 05:27:20 -0600

gvdhoorn gravatar image

The others are right--you didn't run catkin_make yet. Make sure you did all these steps:

cd ~/catkin_ws/src
cd ~/catkin_ws
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

I put semicolons as line terminators because the newlines aren't showing in my answer. Just a bit of extra safety, that's all.

edit flag offensive delete link more


I put semicolons as line terminators because the newlines aren't showing in my answer.

That's because you didn't format it as Preformatted text. Use the button with 101010 on it next time.

gvdhoorn gravatar image gvdhoorn  ( 2016-01-03 05:27:55 -0600 )edit

Cool! I didn't understand what that button was at first glance--thanks for the tip!

dchang0 gravatar image dchang0  ( 2016-01-03 05:45:04 -0600 )edit

Thank you all. Now I can open a new terminal without nasty messages. Chet

ptreyesguy gravatar image ptreyesguy  ( 2016-01-03 14:18:40 -0600 )edit

If this answer solved your issue, please mark it as "Correct" (Just click the ✓ icon). Thank you for keeping the forum clean and well organised!

Martin Peris gravatar image Martin Peris  ( 2016-01-05 20:55:43 -0600 )edit

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: 2015-12-31 03:16:51 -0600

Seen: 20,034 times

Last updated: Jan 03 '16