ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

catkin command not found

asked 2013-12-29 10:49:51 -0500

mr_electric gravatar image

updated 2014-04-20 14:06:45 -0500

ngrennan gravatar image

Hi Everyone, total noob here...

I've run into a problem while trying to use ROS on Ubuntu 12.04. I installed it according to the instructions on the website and the installation seemed to have gone well, but I am unable to build a catkin workspace. I tried rebooting and even installing catkin again but nothing. Terminal (over ssh to my Macbook Pro) continuously gives me the error:

administrator@ROS:~/catkin_ws/src$ catkin_init_workspace Could neither symlink nor copy file "/opt/ros/hydro/share/catkin/cmake/toplevel.cmake" to "/home/administrator/catkin_ws/src/CMakeLists.txt": - [Errno 13] Permission denied - [Errno 13] Permission denied: '/home/administrator/catkin_ws/src/CMakeLists.txt

and if I login as root and attempt, I get:

root@ROS:~# cd ~/catkin_ws/src root@ROS:~/catkin_ws/src# catkin_init_workspace catkin_init_workspace: command not found root@ROS:~/catkin_ws/src#

(ROS is the name of my Ubuntu machine).

I'm pretty sure its something really simple that I'm missing (first time with row), but any help is appreciated. Thanks in Advance! Mr_E

edit retag flag offensive close merge delete

Comments

I first tried as a regular user, but it still did not allow me to access the file. Would deleting the directory I created be sufficient to fix the permissions, or will I have to do a full reinstall?

Thanks for your help!!

Mr_E

mr_electric gravatar image mr_electric  ( 2013-12-29 12:57:59 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
3

answered 2013-12-29 12:02:33 -0500

tfoote gravatar image

You should do everything in the tutorials as non root user. If you use a root user when doing operations the files generated will be owned by root and other users will not have permissions to access those files. Which will give you Permission denied errors like above.

You should clear the workspace and do everything as a non root user.

edit flag offensive delete link more

Comments

1

Please use comments for questions. Yes you need to delete the whole directory as root. (~/catkin_ws)

tfoote gravatar image tfoote  ( 2013-12-29 14:21:27 -0500 )edit
1

answered 2014-11-02 09:01:00 -0500

enyen gravatar image

delete the folder you just created and mkdir new folder without sudo in front.

edit flag offensive delete link more

Comments

I want to backup this short but important tip: using mkdir with sudo puts you on the wrong path. When you later source files into that directory, you may get "permission denied" errors. If that's the case - you may want to change permissions on the directory: https://ss64.com/bash/chmod.html

defelix gravatar image defelix  ( 2017-07-05 02:05:58 -0500 )edit
0

answered 2014-01-02 00:29:38 -0500

Nap gravatar image

In your administrator account, try printenv | grep ROS to confirm the environment variables are set. If not, perhaps you need to add source /opt/ros/hydro/setup.bash at the end of your .bashrc file.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-12-29 10:49:51 -0500

Seen: 14,248 times

Last updated: Jan 02 '14