Troubleshooting of ROS rosdep init / update

Problem description
operating system: ubuntu16.04/ubuntu18.04/ubuntu20.04
ROS version: kinetic / melodic / noetic
recently, I was learning how to install and use orb-slam2. During the compilation process, I found that the rosdep command is needed under ROS

sudo rosdep init

The following error is reported:

ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.

Gu Yue bloggers have sorted out this problem, but according to the current network environment, there are still problems.
Reference article:
1 https://www.guyuehome.com/12640
https://blog.csdn.net/JanKin_ BY/article/details/105509383

The root cause is that the network is blocked. If the above articles are not helpful, please refer to the following solutions:
1. Take the computer to the University Campus (the suffix of the university website is edu.cn Use its campus network to use the rosdep command;
2. Try to use mobile hot spots (China Mobile, China Unicom and China Telecom).

Hope it helps!

Read More: