Ask Your Question

Can't initialize rosdep after installing ROS through conda-forge

asked 2020-03-25 12:12:04 -0500

Yev_D gravatar image


I installed ros-melodic through conda-forge.

conda config --add channels conda-forge
conda config --set channel_priority strict
conda create --name ros --channel conda-forge ros-core ros-actionlib ros-dynamic-reconfigure ros-roslib python=3.6

however when trying to initialize rosdep within the newly created ros environment, it rightfully denies the permissions to /etc/ros/ folder in the root:

ERROR: cannot create /etc/ros/rosdep/sources.list.d:
    [Errno 13] Permission denied: '/etc/ros'

And when writing sudo rosdep init it give same error: sudo: rosdep: command not found, (though I think that's a separate issue).


I don't know where else to ask this but uhm, what do I need to change so that rosdep stays within the conda environment folders and doesn't try to modify root folders?

Details about conda and system ( conda info ): Ubuntu 18.04.4 LTS, conda-forge / packages / ros-roslib 1.14.6

(ros) jek@jek-u18-04-4lts:~$ conda info

     active environment : ros
    active env location : /home/jek/anaconda3/envs/ros
        shell level : 2
       user config file : /home/jek/.condarc
 populated config files : /home/jek/.condarc
      conda version : 4.8.3
    conda-build version : 3.18.11
     python version :
       virtual packages : __cuda=9.1
       base environment : /home/jek/anaconda3  (writable)
       channel URLs :
      package cache : /home/jek/anaconda3/pkgs
       envs directories : /home/jek/anaconda3/envs
           platform : linux-64
         user-agent : conda/4.8.3 requests/2.23.0 CPython/3.7.3 Linux/4.15.0-91-generic ubuntu/18.04.4 glibc/2.27
            UID:GID : 1000:1000
         netrc file : None
       offline mode : False
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-25 14:31:28 -0500

tfoote gravatar image

There's an issue here:

There was an attempted fix here:

But it had to be rolled back: due to

There's a new PR to resolve this here:

edit flag offensive delete link more


ouf, that "new PR" is almost 2 yrs old. Thanks for the links, though they are helpful to track this issue, I won't mark them as an answer yet since, well, since it doesn't resolve the original issue ^_^ Respectfully.

Yev_D gravatar image Yev_D  ( 2020-03-25 15:25:23 -0500 )edit

The best answer to your direct question is the diff attached to the current PR under consideration.

Keeping this open in parallel with the known issue on the tracker isn't going to help get it resolved any sooner and anyone finding this issue should follow up there. Old questions here will just languish this is not an issue tracker that will be triaged and closed out. There's no more correct "answer" possible except to follow up back here when that the open issue has been closed. And based on past performance almost no one will follow up here on an old question to confirm that the other thread has been resolved. But if you want to commit to that it's fine.

tfoote gravatar image tfoote  ( 2020-03-25 16:05:35 -0500 )edit

Yeah, I see your point about not tracking an issue on this platform. That makes sens. I also agree with this question not having its answer for the lack of development for this particular issue. Your answer on git about a work around, that's interesting. Would you mind updating your answer here to include it. Because I'm stuck on this step and not sure what to do. You said that ppl just drop the source file into the root. Could you please specify where or how to write the file, or how does it look?

Yev_D gravatar image Yev_D  ( 2020-03-25 19:30:14 -0500 )edit

rosdep init just fetches this file and drops it at /etc/ros/rosdep/sources.list.d/20-default.list

$ cat /etc/ros/rosdep/sources.list.d/20-default.list 
# os-specific listings first
yaml osx

# generic
gbpdistro fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
tfoote gravatar image tfoote  ( 2020-03-25 20:01:50 -0500 )edit

@tfoote, hey, just wanted to clarify this. Here is what I did, is this correct?

  1. Create folder "/etc/ros/rosdep/sources.list.d/20-default.list/"

    sudo mkdir /etc/ros/rosdep/sources.list.d/20-default.list

  2. Drop the into this folder

    cp /home/jek/Downloads/ /etc/ros/rosdep/sources.list.d/20-default.list

Yev_D gravatar image Yev_D  ( 2020-03-27 10:30:45 -0500 )edit

No it's not the file source code file for processing the list but the data file referenced at that line in the file: that should be put there.

tfoote gravatar image tfoote  ( 2020-03-27 13:43:13 -0500 )edit

@tfoote, that didn't work. I'll just install a separate Uubuntu dedicated for ROS, for now.

Yev_D gravatar image Yev_D  ( 2020-03-28 11:47:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-03-25 12:12:04 -0500

Seen: 413 times

Last updated: Mar 25 '20