ROS Installation Step 5.1 "Permission denied"
I am trying to install ROS and now I am at step
on ROS Tutorials. When I write $ rospack depends1 beginner_tutorials
into the command line that is just like described in the tutorial I can't see the dependencies that are "roscpp rospy std_msgs".Instead of that, I receive an error list consist of permission denied.
Below you can find a few last commands before I encountered the errors below:
Reference: installation guide
cd ~/catkin_ws/src
catkin_create_pkg beginner_tutorials std_msgs rospy roscpp
cd ~/catkin_ws
catkin_make
. ~/catkin_ws/devel/setup.bash
rospack depends1 beginner_tutorials
What is wrong with it? You can find the errors below:
[rospack] Unable to create temporary cache file /home/salim/.ros/.rospack_cache.f19Z8n: Permission denied
enter code hereTraceback (most recent call last):
`File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 59, in init_rospack_interface
lookup = _get_default_RosdepLookup(Options())
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 130, in _get_default_RosdepLookup
verbose=options.verbose)
File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 633, in create_default
sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose)
File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 529, in load_cached_sources_list
with open(cache_index, 'r') as f:
IOError: [Errno 13] Permission denied: '/home/salim/.ros/rosdep/sources.cache/index'
[rospack] Unable to create temporary cache file /home/salim/.ros/.rospack_cache.AGuO7v: Permission denied
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 59, in init_rospack_interface
lookup = _get_default_RosdepLookup(Options())
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 130, in _get_default_RosdepLookup
verbose=options.verbose)
File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 633, in create_default
sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose)
File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 529, in load_cached_sources_list
with open(cache_index, 'r') as f:
IOError: [Errno 13] Permission denied: '/home/salim/.ros/rosdep/sources.cache/index'
[rospack] Error: could not call python function 'rosdep2.rospack.init_rospack_interface'
Thanks
Ubuntu 16.04 LTS Kinetic
Asked by salim on 2018-07-31 11:27:37 UTC
Comments
Can you please update your question with a link to the tutorial that you're referring to
Asked by jayess on 2018-07-31 11:53:06 UTC
In addition to what @jayess asks: please copy-paste the exact error message into your question instead of paraphrasing it. Use the
edit
button/link to update your original question and please use the Preformatted Text button (the one with101010
on it).Asked by gvdhoorn on 2018-07-31 12:13:17 UTC
I have updated the question
Asked by salim on 2018-08-06 15:07:33 UTC
What owner and permission does the file (or the containing directory) have? What exact commands did you run before having the problem?
Asked by Dirk Thomas on 2018-08-06 15:42:29 UTC
I wrote the exact commands in the question :
$ rospack depends1 beginner_tutorials
Asked by salim on 2018-08-06 16:02:24 UTC
@salim: @Dirk Thomas is asking what commands you ran before you had this problem.
Asked by jayess on 2018-08-06 16:12:43 UTC
Thanks @Dirk Thomas, I have updated again.
Asked by salim on 2018-08-07 04:52:52 UTC
Still the same question: What owner and permission does the file (or the containing directory) have?
Asked by Dirk Thomas on 2018-08-07 07:39:17 UTC
Hi Dirk, I will send the owner and permission information but I do not know which directory's parameters should I check? Because I only write
$ rospack depends1 beginner_tutorials
while the line showssalim@salim-Satellite-A200:~$
Asked by salim on 2018-08-29 08:56:12 UTC
The path mentioned in the error message:
/home/salim/.ros/.rospack_cache.f19Z8n
Asked by Dirk Thomas on 2018-08-29 09:14:14 UTC
I have solved the problem! When I was reading the tutorial about system dependencies, I see
rosdep
. It says that if the user have been following the tutorial it is likely that this is the first time user has usedrosdep
. It says that just run two following commands:rosdep init
rosdep update
Asked by salim on 2018-08-30 07:52:33 UTC
This looks like a duplicate of: https://answers.ros.org/question/175599/rosdep-update-permission-error/
Asked by tfoote on 2019-07-23 17:04:26 UTC