Ask Your Question

source command not found

asked 2011-12-14 06:19:42 -0500

rimzahir gravatar image

Hello, I'm trying to install ros on my ubuntu 11.10 and get it work. I followed successfully the tutorial here and I'm attempting to the following one here : According to the second instruction I went to which is in /opt/ros/electric/ and modified it according to the script written in that page. But when I run source, I get the error " /opt/ros/electric/ 2: source: not found " .I tried to change #!/bin/sh by #!/bin/bash in the beginning of the and ran bash /opt/ros/electric/ but I'm still getting the same error

Thank you in advance for your help

Rim Zahir

edit retag flag offensive close merge delete


It would probably help if you posted your edited file. Perhaps somewhere like .
Murph gravatar image Murph  ( 2011-12-14 06:27:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-12-14 06:57:19 -0500

karthik gravatar image

Hi, According to you are not supposed to edit the file in the "/opt/ros/electric/" path but setup in your ros_workspace folder created by you. The idea behind setting up the workspace is to have the packages fetched by ros automatically. Once you download or create a package in this workspace in the future, the ros commands like roscd, rosmake, rosed etc would be able to lookup in this path. Once you setup the environment/workspace, your


would give the following output


You have to source this path to your ~/.bashrc file so that it gets picked up every time you run the terminal.

Hope this helps, Karthik

edit flag offensive delete link more


Thank you for answering that quickly. I set the file back as it was (i changed only the first line so it was easy). You said that I have to setup in ros_worspace, does that mean I have to create the with the script provided in the website in ros_workspace?
rimzahir gravatar image rimzahir  ( 2011-12-14 07:23:15 -0500 )edit
yes just follow the tutorial. replace ~/ros_workspace this with your own workspace path in all the places.
karthik gravatar image karthik  ( 2011-12-14 07:50:02 -0500 )edit
Thanks for your help
rimzahir gravatar image rimzahir  ( 2011-12-22 12:25:00 -0500 )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


Asked: 2011-12-14 06:19:42 -0500

Seen: 2,268 times

Last updated: Dec 14 '11