[rospack] Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
Hi all. I installed ROS (melodic)/Gazebo using the instructions and a shell file found here. I am new to this field, so I was going through http://wiki.ros.org/ROS/Tutorials/, and in section 5.1 of the Creating a Package page, there was a step that told me to run $ rospack depends1 beginner_tutorials
.
When I did that, I got the error from the title:
[rospack] Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
I followed what it said and tried sudo rosdep init
and I got sudo: rosdep: command not found
and when I did rosdep update
I got Command 'rosdep' not found, but can be installed with: sudo apt install python-rosdep2
.
Running the install
command overwrites packages installed by the shell file, and that causes a lot more errors when trying to build the file, so I overwrote those changes by installing from the shell file again. My question is, how do I fix this error without installing python-rosdep2, because that is obviously causing problems.
I'm pretty new to this field, so I don't know if this is sufficient information, but please let me know if you can help me out.
Same issue in ROS Noetic. And installing python-rosdep2 broke a bunch of other things