Ask Your Question
0

not able to source setup.bash after installing ros kinetic on ubuntu-16.04

asked 2016-11-19 02:52:49 -0600

prrraveen gravatar image

updated 2016-11-19 22:03:31 -0600

I followed this installation guide. I didn't get any error while installing.

but source /opt/ros/kinetic/setup.bash throw error

/opt/ros/kinetic/setup.bash:.:8: no such file or directory: /home/praveen/catkin_ws/setup.sh

I get similar error in catkin workspace source devel/setup.bash throw devel/setup.bash:.:8: no such file or directory: /home/praveen/catkin_ws/setup.sh

when running this command inside devel dir. it returns

praveen@praveen ~/catkin_ws/devel
 % source setup.bash 
/opt/ros/kinetic/etc/catkin/profile.d/05.catkin_make.bash:67: command not found: complete
/opt/ros/kinetic/etc/catkin/profile.d/05.catkin_make_isolated.bash:65: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:961: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:962: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:963: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:964: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:965: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:966: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:967: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:968: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:969: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:970: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:971: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:972: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:973: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:974: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:975: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:976: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:977: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:978: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:979: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:980: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:981: command not found: complete
/opt/ros/kinetic/share/rosbash/rosbash:982: command not found: complete
/opt/ros/kinetic/etc/catkin/profile.d/20.transform.bash:23: command not found: complete
/opt/ros/kinetic/etc/catkin/profile.d/20.transform.bash:42: command not found: complete

echo $ROS_PACKAGE_PATH outputs /opt/ros/kinetic/share

% cat /opt/ros/kinetic/setup.bash
#!/usr/bin/env bash
# generated from catkin/cmake/templates/setup.bash.in

CATKIN_SHELL=bash

# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"
edit retag flag offensive close merge delete

Comments

Did you have a from-sources installation before you installed from debians? Especially this:

/opt/ros/kinetic/setup.bash:.:8: no such file or directory: /home/praveen/catkin_ws/setup.sh

is suspicious. Files in /opt/ros/$distro should not refer to files in your $HOME.

gvdhoorn gravatar imagegvdhoorn ( 2016-11-19 05:20:11 -0600 )edit

Can you add the contents of /opt/ros/kinetic/setup.bash to your question?

gvdhoorn gravatar imagegvdhoorn ( 2016-11-19 05:20:28 -0600 )edit
1

The many warnings about complete not being found makes it seem like you're not using bash. Are you using some other shell like csh or zsh?

ahendrix gravatar imageahendrix ( 2016-11-19 17:52:36 -0600 )edit

Yes, I am using zsh. I suspect that is causing issue. I will try in normal bash shell and let you know. Thanks

prrraveen gravatar imageprrraveen ( 2016-11-19 21:58:31 -0600 )edit

I tried it in normal shell. I am getting same error.

prrraveen gravatar imageprrraveen ( 2016-11-19 22:00:48 -0600 )edit

Do you still get errors if you use setup.zsh?

gvdhoorn gravatar imagegvdhoorn ( 2016-11-20 01:03:38 -0600 )edit

@gvdhoorn. setup.zsh seems working. it is not giving any error. Could you please write an answer so I can mark as correct answer. Hopefully explaining the underline issue. Thanks

prrraveen gravatar imageprrraveen ( 2016-11-20 01:23:37 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-11-20 02:12:23 -0600

gvdhoorn gravatar image

updated 2016-11-20 02:25:36 -0600

If you're using zsh as your shell, you should source the setup.zsh file, not setup.bash. The two files are only compatible with their respective shells.

Edit: strangely enough, the Indigo installation documentation explicitly mentions this (under Environment setup), but the Kinetic instructions didn't. I've added it in kinetic/Installation/DebEnvironment?action=diff&rev2=3&rev1=2).

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

Stats

Asked: 2016-11-19 02:52:49 -0600

Seen: 1,924 times

Last updated: Nov 20 '16