The ROS installation process can be seen in my previous blog Ubuntu20.04 Install ROS Noetic
During the installation process, rosdep init appears [ ERROR: cannot download default sources list from:…Website may be down. ]
rosdep update , and there is always a timeout problem that cannot be updated.
Finally found a reliable and usable method.
Both of these problems are related to network connection, and the solutions are the same, both of which are to modify the host .
Only after the modification is completed, rosdep init can directly succeed. The rosdep update also requires a reliable network. If the update still fails, it is recommended to try several times, or try to change the mobile hotspot network
1. Open the ip query URL
2. Enter raw.githubusercontent.com to query ip
raw.githubusercontent.com
3. Add all the resolved IP addresses to the end of the /etc/hosts file, format: 185.199.109.133 raw.githubusercontent.com
sudo gedit /etc/hosts
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
185.199.109.133 raw.githubusercontent.com
185.199.108.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
Save back to the command line