Rosanswers logo

Hey all, I seem to be having this problem whenever using rosdep

ERROR: Rosdep experienced an internal error: [Errno 13] Permission denied: '/home/barrybear/.ros/rosdep/sources.cache/index' Please go to the rosdep page [1] and file a bug report with the stack trace below. [1] : http://www.ros.org/wiki/rosdep

Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 116, in rosdep_main exit_code = _rosdep_main(args) File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 257, in _rosdep_main return _package_args_handler(command, parser, options, args) File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 331, in _package_args_handler lookup = _get_default_RosdepLookup(options) File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 107, in _get_default_RosdepLookup verbose=options.verbose) File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 501, in create_default sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose) File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 419, in load_cached_sources_list with open(cache_index, 'r') as f: IOError: [Errno 13] Permission denied: '/home/barrybear/.ros/rosdep/sources.cache/index'

Whenever I try to apply sudo rosdep, I'll obtain this error:

ERROR: Rosdep cannot find all required resources to answer your query Missing resource scan_tools

Can anyone please help me with a fix? Thanks :)

Originally posted by barrybear on ROS Answers with karma: 57 on 2012-12-20

Post score: 0


2 Answers 2


Rosanswers logo

First you can verify that all urls listed under /etc/ros/rosdep/sources.list.d/ are valid. For me the file 20-default.list looks like:

# os-specific listings first
yaml https://github.com/ros/rosdistro/raw/master/rosdep/osx-homebrew.yaml osx
yaml https://github.com/ros/rosdistro/raw/master/rosdep/gentoo.yaml gentoo
# generic
yaml https://github.com/ros/rosdistro/raw/master/rosdep/base.yaml
yaml https://github.com/ros/rosdistro/raw/master/rosdep/python.yaml
yaml https://github.com/ros/rosdistro/raw/master/rosdep/ruby.yaml
gbpdistro https://github.com/ros/rosdistro/raw/master/releases/fuerte.yaml fuerte
gbpdistro https://github.com/ros/rosdistro/raw/master/releases/groovy.yaml groovy

Second you might have ran "rosdep update" once with sudo and now the file in your home directory are owner my root and not writable by you anymore. You should remove the folder ~/.ros/rosdep and call "rosdep update" again.

Originally posted by Dirk Thomas with karma: 16276 on 2012-12-21

This answer was ACCEPTED on the original site

Post score: 5

Original comments

Comment by barrybear on 2012-12-21:
Thats superb! I've got the same listings as the first, and i rm -rf the rosdep dir and call the update again as stated, now it works! ;) Thanks!!


Rosanswers logo

I know there's already an answer that worked, but for me, the permission denied error were resolved by running "sudo rosdep fix-permissions" from my /home directory. Not sure if being in the /home directory matters, though.

Originally posted by ElizabethA with karma: 120 on 2016-05-20

This answer was NOT ACCEPTED on the original site

Post score: 1

Original comments

Comment by Femer on 2017-01-19:
Thanks! This was very useful!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.