Binary installation reference: https://index.ros.org/doc/ros2/Installation/Dashing/Linux-Install-Debians/
When performing this step:
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
An error occurred:
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
[sudo] password for gym:
gpg: no valid OpenPGP data found.
That is, the connection to raw.githubusercontent.com failed
Solution:
Open the webpage:
https://site.ip138.com/raw.Githubusercontent.com/
Enter raw.githubusercontent.com to query the IP address
Open a terminal and enter the command:
sudo nano /etc/hosts
Add this sentence at the end of the file:
185.199.109.133 raw.githubusercontent.com
The IP address in the command can be changed according to the IP queried on the web page