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

mkdir: cannot create directory `build': Permission denied [closed]

asked 2014-01-15 00:56:15 -0500

seredin gravatar image

updated 2019-04-25 18:12:00 -0500

tfoote gravatar image

Hi all!

I am install stack hark-ros-stacks-groovy from repo. When I create new package with hark_msgs dependence. I do rosmake and have error message:

[rosmake-1] Starting >>> hark_msgs [ make ]                                       
[ rosmake ] All 2 lineshark_msgs: 0... [ 2 Active 22/26 Complete ]
{-------------------------------------------------------------------------------
  mkdir: cannot create directory `build': Permission denied
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package hark_msgs written to:
[ rosmake ]    /home/max/.ros/rosmake/rosmake_output-20140115-161903/hark_msgs/build_output.log

I create my package in my ros_workspace. When I delete hark_msgs dependence, I have not error message.

This all listing of my rosmake with error.

max@max-PC:~/ros_workspace/my_pack$ rosmake 
[ rosmake ] rosmake starting...                                                   
[ rosmake ] No package specified.  Building ['my_pack']                           
[ rosmake ] Packages requested are: ['my_pack']                                   
[ rosmake ] Logging to directory /home/max/.ros/rosmake/rosmake_output-20140115-175822
[ rosmake ] Expanded args ['my_pack'] to:
['my_pack']                             
[rosmake-0] Starting >>> catkin [ make ]                                          
[rosmake-0] Finished <<< catkin ROS_NOBUILD in package catkin
 No Makefile in package catkin
[rosmake-0] Starting >>> genmsg [ make ]                                          
[rosmake-0] Finished <<< genmsg ROS_NOBUILD in package genmsg
 No Makefile in package genmsg
[rosmake-0] Starting >>> genlisp [ make ]                                         
[rosmake-1] Starting >>> genpy [ make ]                                           
[rosmake-1] Finished <<< genpy ROS_NOBUILD in package genpy
 No Makefile in package genpy
[rosmake-1] Starting >>> gencpp [ make ]                                          
[rosmake-1] Finished <<< gencpp ROS_NOBUILD in package gencpp
 No Makefile in package gencpp
[rosmake-1] Starting >>> cpp_common [ make ]                                      
[rosmake-1] Finished <<< cpp_common ROS_NOBUILD in package cpp_common
 No Makefile in package cpp_common
[rosmake-1] Starting >>> rostime [ make ]                                         
[rosmake-0] Finished <<< genlisp ROS_NOBUILD in package genlisp
 No Makefile in package genlisp
[rosmake-0] Starting >>> message_generation [ make ]                              
[rosmake-0] Finished <<< message_generation ROS_NOBUILD in package message_generation
 No Makefile in package message_generation
[rosmake-0] Starting >>> rospack [ make ]                                         
[rosmake-0] Finished <<< rospack ROS_NOBUILD in package rospack
 No Makefile in package rospack
[rosmake-1] Finished <<< rostime ROS_NOBUILD in package rostime
 No Makefile in package rostime
[rosmake-1] Starting >>> roscpp_traits [ make ]                                   
[rosmake-1] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits
 No Makefile in package roscpp_traits
[rosmake-1] Starting >>> roscpp_serialization [ make ]                            
[rosmake-1] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization
 No Makefile in package roscpp_serialization
[rosmake-1] Starting >>> message_runtime [ make ]                                 
[rosmake-1] Finished <<< message_runtime ROS_NOBUILD in package message_runtime
 No Makefile in package message_runtime
[rosmake-0] Starting >>> roslib [ make ]                                          
[rosmake-0] Finished <<< roslib ROS_NOBUILD in package roslib
 No Makefile in package roslib
[rosmake-0] Starting >>> rosunit [ make ]                                         
[rosmake-0] Finished <<< rosunit ROS_NOBUILD in package rosunit
 No Makefile in package rosunit
[rosmake-0] Starting >>> rosconsole [ make ]                                      
[rosmake-0] Finished <<< rosconsole ROS_NOBUILD in package rosconsole
 No Makefile in package rosconsole
[rosmake-1] Starting >>> std_msgs [ make ]                                        
[rosmake-1] Finished <<< std_msgs ROS_NOBUILD in package std_msgs
 No Makefile in package std_msgs
[rosmake-1] Starting >>> rosgraph_msgs [ make ]                                   
[rosmake-1] Finished <<< rosgraph_msgs ROS_NOBUILD in package rosgraph_msgs
 No Makefile in package rosgraph_msgs
[rosmake-1] Starting >>> roslang [ make ]                                         
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang
 No Makefile in package roslang
[rosmake-0] Starting >>> xmlrpcpp [ make ]                                        
[rosmake-0] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp
 No Makefile in package xmlrpcpp
[rosmake-0] Starting >>> rosgraph [ make ]                                        
[rosmake-0] Finished <<< rosgraph ROS_NOBUILD in package rosgraph
 No Makefile in package rosgraph
[rosmake-0] Starting >>> rospy [ make ]                                           
[rosmake-0] Finished <<< rospy ROS_NOBUILD in package rospy
 No Makefile in package rospy
[rosmake-1] Starting >>> roscpp [ make ]                                          
[rosmake-1] Finished <<< roscpp ROS_NOBUILD in package roscpp
 No Makefile in package roscpp
[rosmake-1] Starting >>> hark_msgs [ make ]                                       
[ rosmake ] All 2 lineshark_msgs: 0.0 sec ]            [ 1 Active 22/24 Complete ]
{-------------------------------------------------------------------------------
  mkdir: cannot create directory `build': Permission denied
-------------------------------------------------------------------------------}
[ rosmake ] Output from ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2019-04-25 18:12:09.426703

Comments

Where do you create that package exactly, do you have write permission there? (try commands "pwd" and "ls -la")

AHornung gravatar image AHornung  ( 2014-01-15 01:46:00 -0500 )edit
1

Since the error appears when compiling hark_msgs: Where are the package files? Try `roscd hark_msgs`.

AHornung gravatar image AHornung  ( 2014-01-15 03:13:33 -0500 )edit

Where did this hark_ stuff come from? Did you install this via apt-get? Can you list the files in the hard_msgs package?

dornhege gravatar image dornhege  ( 2014-01-15 03:30:07 -0500 )edit

That looks kinda odd to me. For an installed package I would have expected no build dir and a ROS_NOBUILD file. Maybe it was not released correctly? Someone with more experience on package releases might comment on that.

dornhege gravatar image dornhege  ( 2014-01-15 05:00:14 -0500 )edit

Here is a huge hack that *might* fix you problem temporarily: Create a file ROS_NOBUILD in that package (as root). If this doesn't work, better remove it as you messed with an installation.

dornhege gravatar image dornhege  ( 2014-01-15 05:01:37 -0500 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2014-01-15 20:02:51 -0500

Wolf gravatar image

You are using ROSBUILD, which - unlike catkin - creates a build directory in each project directory. As you installed the hark_<foo> package to /opt/ros where you do not have write permissons without sudo, rosbuild cannot create a build directory there.

You have two options: 1) Give your user write permissions recursively for the /opt/ros folder, run rosmkae onces and remove the write permissions of your user again. As you do not change anything in the package it should not cause throubles in following rosmakes if already built once. (Remark, sudo rosmake won't work as sudo comands are called from another user, who does not have a ros installation)

2) (I'd recommend that) remove hark_ros_stacks from /opt/ros (with sudo) and install them to your ros_workspace in your home directory. Then everything should work. (You could make a nice subfolder e.g. external with packages of others from stacks, if you whish to separate them...)

edit flag offensive delete link more

Comments

2

According to the user, this was an apt-get, so 2) will not work and 1) should not be required unless the release is broken.

dornhege gravatar image dornhege  ( 2014-01-15 22:35:52 -0500 )edit

@dornhege You are right, sorry. I did not pay enough attention, just assumed git for such error... Feel free to down vote my answer.. I think probably you are right and the release is broken...

Wolf gravatar image Wolf  ( 2014-01-16 00:28:01 -0500 )edit
-1

answered 2014-01-15 01:45:21 -0500

It seems, taht you have no rights to make a directory in your Catkin workspace, where catkin would build its ´build´-directory.

So you need to change access-rights from read to write.

edit flag offensive delete link more
-2

answered 2015-10-19 20:43:49 -0500

you just need to add sudo before it

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-01-15 00:56:15 -0500

Seen: 8,557 times

Last updated: Jan 15 '14