问题简述

sudo 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.

解决方案

解决方案0x01

如果你正遇到这个问题,那么第一个解决方案就是,更换网络,你可以尝试使用你的手机热点,然后继续尝试以下指令,如果你成功了,那么你可以结束本文章的阅读,当然欢迎你继续阅读。

sudo rosdep init
rosdep update

解决方案0x02

该解决方案是针对由于以下两个无法正常访问,但可以ping通,于是修改hosts文件,加入以下两个网址的IP地址实现访问。

通过 https://site.ip138.com/查询网址对应的IP

sudo gedit /etc/hosts199.232.28.133 raw.githubusercontent.com
151.101.228.133 raw.github.com

修改完成后,在终端执行

sudo rosdep init
rosdep update

解决方案0x03

如果使用解决方案0x01仍然无法解决你的问题,那么你可以尝试以下步骤,此解决方案的原理是基于手动完成sudo rosdep init的步骤,然后再通过rosdep update完成整个方案的实施。 步骤一:首先打开一个终端,执行以下指令创建root并切换至root用户

sudo passwd    //接着提示输入UNIX密码,输入你的用户密码即可
sudo su //或者su root 然后输入密码切换至root用户
sudo mkdir -p /etc/ros/rosdep/sources.list.d
cd /etc/ros/rosdep/sources.list.d
sudo gedit 20-default.list

步骤二:将以下内容复制进20-default.list文件中

# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

步骤三:执行以下指令

exit //退出root用户
rosdep update

如果你成功了,那么你可以结束本文章的阅读,当然欢迎你继续阅读。 但也许你会遇到如下图所示的问题,发现20-default.list中的地址都无法连接,此时你可以将20-default.list中的内容替换如下,即将raw.githubusercontent.com替换为raw.github.com后保存文件,在终端中执行

rosdep update

如果你成功了,那么你可以结束本文章的阅读,当然欢迎你继续阅读

# os-specific listings first
yaml https://raw.github.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx# generic
yaml https://raw.github.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.github.com/ros/rosdistro/master/releases/fuerte.yaml fuerte# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

步骤四:番外篇 也许执行完上述步骤,你在终端中收到的信息,仍然是连接被拒绝,或者时间超出导致中断,此时你可以执行以下指令

sudo su
sudo gedit /etc/hosts

在hosts中添加以下内容并保存,在执行完后继续rosdep update

199.232.28.133 raw.githubusercontent.com
151.101.228.133 raw.github.com

解决方案 0x04-终极篇

如果上述步骤仍然不能解决你的问题,那么可以进行这最后的步骤。 执行以下指令,

sudo rosdep init

系统提示已经存在20-default.list(于解决方案0x02创建),那么下面就将该文件删除

sudo su
cd /etc/ros/rosdep/sources.list.d
sudo rm 20-default.list
exit

移除文件后打开新的终端

sudo rosdep init
rosdep update

ROS:rosdep init 安装问题解决方案-转载相关推荐

  1. ROS的 sudo rosdep init 的报错终极解决方案

    ROS的 sudo rosdep init 的报错解决方案 安装ROS时sudo rosdep init指令报错: ERROR: cannot download default sources lis ...

  2. Ubuntu18.04安装ROS最后的rosdep update不成功解决方案(亲测可行)

    Ubuntu18.04安装ROS最后的rosdep update不成功解决方案(亲测可行) 问题描述 很多人在安装ROS时会卡在最后一步rosdep update上面,虽然这一步不成功并不影响小海龟的 ...

  3. Ubuntu18.04安装ros(顺利解决 sudo rosdep init 与 rosdep update 存在的问题,附保姆级图文流程)

    Ubuntu18.04(Ubuntu20.04)安装ros(顺利解决 sudo rosdep init 与rosdep update 存在的问题,附保姆级图文流程) 前言 安装了很多次,东拼西凑好多博 ...

  4. Ubuntu18.04安装ROS过程记录:主要解决 sudo rosdep init时的无法连接和rosdep update时的time out问题

    安装流程基本上参考的文章[1],在过程中遇到一些问题.采用以下步骤解决: 1.是初始化命令时出错 sudo rosdep init 提示:sudo rosdep:找不到命令提示,参照[2]的解决方案 ...

  5. Ubuntu20.04及18.04的ROS安装教程及各种失败解决方法 (sudo rosdep init找不到命令或失败与rosdep update一直timeout,roscore找不到命令)

    项目场景:ros安装 在安装ROS的过程中一般选择有网络非常好的网络进行安装,这样就可以全程顺利执行一次性安装成功,但不顺利也没问题这个教程将会给出解决由网络原因造成安装失败的解决方法 安装步骤:Ct ...

  6. Ubuntu16.04安装ROS时,sudo rosdep init报错,Error: cannot download default sources list from:

    安装ROS时需要安装rosdep,但是由于外网访问不了,所以访问不了https://raw.githubusercontent.com/网站.因此在执行sudo rosdep init这一步时,会提示 ...

  7. ROS安装时rosdep init与rosdep update问题解决方法(2022.04.08亲测)

    2022.4.8更新: 运行下面的指令即可 sudo apt-get install python3-pip sudo pip3 install rosdepc sudo rosdepc init r ...

  8. 安装ROS使用sudo rosdep init 报错ERROR: cannot download default sources list from:

    Author: 杭州电子科技大学-自动化学院-智能系统和机器人研究中心-Jolen Xie Q:安装ROS使用rosdep init报错 sudo apt install python-rosdep ...

  9. 解决安装ROS时出现的sudo rosdep init错误问题

    解决安装ROS时出现的sudo rosdep init错误问题 目前安装ROS时输入sudo rosdep init的命令时,可能会出现以下的错误: ERROR: cannot download de ...

最新文章

  1. CIA公布了收集和存储美国公民信息的新规则
  2. python飞机大战资料-Python之游戏开发-飞机大战
  3. 【Head First Java 读书笔记】(一)基本概念
  4. 阿里巴巴HRSSC:用宜搭实现业务管理模式创新
  5. Android系统开发(3)---如何分析ANR Log的总结
  6. SpringBoot迭代发布下的Jar瘦身实践
  7. matlab 工具函数(一) —— 添加指定 SNR 的噪声
  8. 苹果Mac桌面时钟推荐:OneClock提供多种样式和自定义选项
  9. oracle创建默认序列号,PLS-00103:为序列号oracle创建触发器(PLS-00103: Create trigger for sequence number oracle)...
  10. 【五线谱】重音记号、渐强记号、渐弱记号
  11. mongodb仲裁者_真理的仲裁者
  12. https利用360cdn实现网站加速
  13. android 美团拆包,如何进行拆包合包操作?
  14. python输出每行输出5个_python编程—在控制台连续输出五行*,每一行星号数量一次递增...
  15. 怎么调用接口发国际验证码和通知短信?
  16. 戴尔c语言编译器如何安装,戴尔的显示屏该怎么安装?精彩图解教程
  17. Cascade-RCNN
  18. linux c 读取u盘mbr,fbinst 启动U盘解读(MBR层面)
  19. 拉格朗日松弛算法在组合优化问题中的应用
  20. 计算机windows7桌面管理,windows7桌面图标【管理要领】

热门文章

  1. UOJ#271. 【清华集训2016】连通子树(虚树+倍增)
  2. 如何将Word文件转化为Latex文件:word-to-latex-2.56详解
  3. 创联群控系统实时投屏一人操作N台手机
  4. decibel,dBm,dBi,dBd
  5. 《数值分析(原书第2版)》—— 导读
  6. ​今年36岁,北邮硕士毕业,待过字节,阿里,最近被裁员,只能去外包。。。...
  7. 云队友丨任正非:没有退路,就是胜利之路
  8. 单元测试Mock框架--Mockito
  9. Maven3.5.3下载安装与环境配置
  10. jq常用过滤器_jquery 过滤器界别