ROS安装时,sudo rosdep init指令报错解决方案
问题描述
在安装ROS执行到sudo rosdep init命令时,由于国内防火墙的限制,导致rosdep init命令无法执行成功,出现如下错误:
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.
具体解决方法如下:
(1) 打开网址https://site.ip138.com/raw.Githubusercontent.com/,在打开界面输入无法访问的IP地址:raw.githubusercontent.com
(2)记录当前解析下的可访问IP地址,如上图中185.199.111.133
(3)配置本地hosts文件,将以下代码添加到hosts文件里,保存,然后重新执行
185.199.111.133 raw.githubusercontent.com
- Windows系统的hosts文件位于:C:/Windows/System32/drives/etc目录下
-
Linux系统的hosts文件位于:/etc/hosts
至此,可解决由于防火墙外网访问限制导致的rosdep init失败问题。
阅读剩余
版权声明:
作者:姜九二
链接:https://www.jiangjianwu.cn/development/deep-learning/617/ros%e5%ae%89%e8%a3%85%e6%97%b6%ef%bc%8csudo-rosdep-init%e6%8c%87%e4%bb%a4%e6%8a%a5%e9%94%99%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88.html
文章版权归作者所有,未经允许请勿转载。
THE END