ubuntu22.04安裝ros時在執(zhí)行下面命令時報(bào)錯:
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
報(bào)錯:
curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒絕連接
同時執(zhí)行后面命令sudo apt update的時候,同時報(bào)錯:
W: GPG 錯誤:http://packages.ros.org/ros2/ubuntu jammy InRelease: 由于沒有公鑰,無法驗(yàn)證下列簽名: NO_PUBKEY F42ED6FBAB17C654
E: 倉庫 “http://packages.ros.org/ros2/ubuntu jammy InRelease” 沒有數(shù)字簽名。
N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源。
N: 參見 apt-secure(8) 手冊以了解倉庫創(chuàng)建和用戶配置方面的細(xì)節(jié)。
解決辦法:
1、在網(wǎng)站https://www.ipaddress.com中搜索raw.githubusercontent.com的IP地址,把找到的IP地址復(fù)制到host文件;
https://www.ipaddress.com/
選擇其中一個IP地址即可;
2、
sudo gedit /etc/hosts
3、在文件中添加185.199.108.133 raw.githubusercontent.com
4、
sudo sh -c ‘echo “deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu lsb_release -cs main” > /etc/apt/sources.list.d/ros2.list’
繼續(xù)執(zhí)行安裝命令,上述問題均解決!
參考:
Ubuntu安裝ROS2完整教程和踩坑經(jīng)歷_https://raw.githubusercontent.com/ros/rosdistro/ma_Raine_Yang的博客-CSDN博客文章來源:http://www.zghlxwxcb.cn/news/detail-759476.html
查詢r(jià)aw.githubusercontent.com的服務(wù)器 IP 地址_SabrinaW711的博客-CSDN博客?文章來源地址http://www.zghlxwxcb.cn/news/detail-759476.html
到了這里,關(guān)于ubuntu22.04安裝ROS報(bào)錯curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒絕連接的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!