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

"sudo rosmake" permission denied problem

asked 2011-03-08 19:44:30 -0600

Shark gravatar image

updated 2014-01-28 17:09:18 -0600

ngrennan gravatar image

Hello,

I'm trying to install the rgbdslam package and following the installation instructions here: http://www.ros.org/wiki/openni/Contes...

I've svn checked out "rgbdslam" and "hogman_minimal" packaged into my "/opt/ros/diamondback/stacks" directory.

When I try to issue the command "rosmake --rosdep-install rgbdslam" it gives an error mid-way into the installation saying "mkdir: cannot create directory `build': Permission denied". Naturally, I tried adding sudo infront of the command, but then I get the error "sudo: rosmake: command not found".

What is wrong?

Here are the lines from my bashrc file, in case this has to do with some incorrect environment paths:

source /opt/ros/diamondback/setup.bash export ROS_PACKAGE_PATH=/opt/ros/diamondback/stacks:$ROS_PACKAGE_PATH

edit retag flag offensive close merge delete

5 Answers

Sort by » oldest newest most voted
13

answered 2011-03-09 01:52:51 -0600

joq gravatar image

In case someone else stumbles across this question: note that the /opt/ros package directories are intended to be shared by all users on that system.

Modifying their contents is not a good idea.

As shark hinted above, if you need to modify one of the installed packages, check the sources for its stack out of the source repository, placing them ahead of the /opt/ros stacks in the $ROS_PACKAGE_PATH. Then, use rosmake normally to build your modified version. That way, tools like svn diff or git diff make it easy to submit your changes as a patch.

edit flag offensive delete link more

Comments

1
This applies even for a single-user machine. If you have installed ROS via Ubuntu packages, the package manager will not preserve changes you made to /opt/ros, so you will end up like http://http://answers.ros.org/question/2304
roehling gravatar image roehling  ( 2011-11-27 22:06:31 -0600 )edit
1
130s gravatar image 130s  ( 2011-12-08 06:18:23 -0600 )edit
Oh, sneaky little http://... :-)
roehling gravatar image roehling  ( 2011-12-09 08:25:03 -0600 )edit

I type rosmake stage and gives the same problem. I haven't changed anything. Just following the instructions

McMurdo gravatar image McMurdo  ( 2012-03-30 21:53:03 -0600 )edit
4

answered 2011-03-08 22:54:15 -0600

Shark gravatar image

I fixed the problem. Instead of downloading stacks into a restricted folder, downloaded to my own folder and made sure the ROS_PACKAGE_PATH included this new directory. When I ran the rosmake command, it worked.

Another (hacked) solution I found was changing the read/write/exec permissions on the folders within the /opt/ros/.../rgbdslam folders.

edit flag offensive delete link more

Comments

1
This hack is unpredictable as a new update might overwrite your changes and delete files.
KoenBuys gravatar image KoenBuys  ( 2011-03-09 03:43:26 -0600 )edit
2

answered 2011-03-09 01:43:34 -0600

Julius gravatar image

When checking out stacks from SVN you might want to use the rosinstall mechanism. Download rosinstall from http://pypi.python.org/pypi/rosinstall/ and follow the tutorial. I can see that you have already found a solution for your problem, but the rosinstall setup is quite comfortable (also helpful to quickly setting up environment and path).

edit flag offensive delete link more
1

answered 2012-08-10 05:53:09 -0600

remlog gravatar image

I have the same problem when I am installing orocos and i found that change the owner of the directory (using chown )can solve the problem:

chown -R username:groupname \mydirectory

(i.e.)

chown -R robot:robot /home/robot/ros_workspace

http://www.linuxforums.org/forum/mandriva-linux/38322-folder-permissions.html

edit flag offensive delete link more
-1

answered 2011-11-27 00:15:44 -0600

Ting gravatar image

Dear Shark,

I have the same problem, too.

Could you please tell how to "made sure the ROS_PACKAGE_PATH included this new directory."?

I've svn checked out "rgbdslam" and "hogman_minimal" packaged into my "/home/user" directory.

How can I change ROS_PACKAGE_PATH?

I am a new in Linux. Thanks for your help.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-03-08 19:44:30 -0600

Seen: 6,808 times

Last updated: Aug 10 '12