- 2021.12.9 更新 -

系统: Ubuntu 16.04
使用有线网, ubuntu源是阿里云镜像源.

问题描述:

按照官网教程安装 ROS kinetic 时, 在 sudo rosdep init 后进行 rosdep update 时, 频繁报错超时, 原因是连外网 raw.githubusercontent.com 总是超时失败. 这种情况在境外不会发生, 因此ROS官网里的安装教程是解决不了的.

失败尝试:

尝试以下方法均无效:

  1. 连手机热点
  2. 修改超时容限 DOWNLOAD_TIMEOUT = 10000s (原先默认15s)
  3. 换中科大源 \ 清华源
  4. 开 VPN
  5. 在/etc/hosts文件里加上 raw.githubusercontent.com 和 raw.github.com
  6. 在 /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py 中顶部直接插入两行代码取消SSL验证

以上方法均无效. 每次都可以断断续续hit到部分网站, 但部分网址还会报超时错误, 无法完成全部更新.

折腾一上午,终于找到了可以解决的办法. 参考: 博客

解决方法:

  1. 在安装 ROS 前设置 key 时就用国内的镜像,而不要用官网上 set up key 的命令 (因为它要用到外网raw.githubusercontent.com,也会超时):
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  1. 使用国内 gitee 镜像里的对应文件替代 raw.githubusercontent.com (避免访问外网下载文件):
cd /usr/lib/python3/dist-packages/
sudo gedit ./rosdep2/sources_list.py
sudo gedit ./rosdep2/gbpdistro_support.py
sudo gedit ./rosdep2/rep3.py

将上述三个文件中的 “raw.githubusercontent.com/ros/rosdistro/master” 替换为 “gitee.com/ssonic/rosdistro/raw/master

  1. 如果之前已经运行过 sudo rosdep init, 则删除旧的 sources.list.d/20-default.list
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
  1. 进行 rosdep 的初始化和更新
sudo rosdep init
rosdep update

终于可以顺利更新完, 终端显示:

reading in sources list data from /etc/ros/rosdep/sources.list.d
Warning: running ‘rosdep update’ as root is not recommended.
You should run ‘sudo rosdep fix-permissions’ and invoke ‘rosdep update’ again without sudo.
Hit https://gitee.com/ssonic/rosdistro/raw/master/rosdep/osx-homebrew.yaml
Hit https://gitee.com/ssonic/rosdistro/raw/master/rosdep/base.yaml
Hit https://gitee.com/ssonic/rosdistro/raw/master/rosdep/python.yaml
Hit https://gitee.com/ssonic/rosdistro/raw/master/rosdep/ruby.yaml
Hit https://gitee.com/ssonic/rosdistro/raw/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro “ardent”
Skip end-of-life distro “bouncy”
Skip end-of-life distro “crystal”
Skip end-of-life distro “dashing”
Skip end-of-life distro “eloquent”
Add distro “foxy”
Add distro “galactic”
Skip end-of-life distro “groovy”
Skip end-of-life distro “hydro”
Skip end-of-life distro “indigo”
Skip end-of-life distro “jade”
Skip end-of-life distro “kinetic”
Skip end-of-life distro “lunar”
Add distro “melodic”
Add distro “noetic”
Add distro “rolling”
updated cache in /home/likeyu/.ros/rosdep/sources.cache

(已解决) 境内 Ubuntu16.04 下安装 ROS kinetic 时 rosdep update 超时报错: The handshake operation timed out相关推荐

  1. ubuntu16.04 LTS安装ROS Kinetic详细步骤(包含出现的错误)

    因为搞机器人的缘故,现在打算换个平台做仿真,所以安装ROS学习一下,记录一下安装过程用作备份. 1. 添加ROS源sources.list sudo sh -c 'echo "deb htt ...

  2. ROS学习系列(一):ubuntu16.04下安装 ROS IDE RoboWare Studio 教程

    1.下载RoboWare Studio安装包 不要信从官网下载http://www.roboware.me/#/home 这个网站压根就进不去. 从github上下载安装包,链接https://git ...

  3. (已解决) Ubuntu 16.04 下安装和使用 TP-Link 的USB无线网卡

    在 Ubuntu 16.04 下使用 TP-Link USB无线网卡的通用方法 第一步: 查看 TP-link 网卡具体型号 未插无线网卡时, 终端里输入 lsusb 插上USB无线网卡, 终端里再次 ...

  4. Ubuntu 18.04快捷安装ROS Melodic及rosdep update time out的问题解决

    1. ROS快捷安装 以下安装指令汇总针对Ubuntu18.04的ROS Melodic版本: 强烈建议复制以下指令到新建的xxx.sh文件中,保存后给xxx.sh权限,然后执行脚本一路输入y等候安装 ...

  5. ubuntu安装ROS进行到rosdep update时出现错误,如ERROR: unable to process source ...

    1.错误描述: ming@ming:~$ rosdep update reading in sources list data from /etc/ros/rosdep/sources.list.d ...

  6. 小白必看,关于如何在Ubuntu16.04中安装ROS,以及安装过程遇到的错误怎么解决。

    如何在虚拟机中安装ROS,以及安装过程的错误总结,适合小白. 首先安装ROS需要在Linux系统下,如果你不会安装双系统就安装一个虚拟机 对于刚刚接触ros的人来说,首先就是解决安装问题,本人在网上查 ...

  7. ubuntu16.04下安装openssh-server报依赖错误的解决方法

    ubuntu16.04下安装openssh-server报依赖错误的解决方法 参考文章: (1)ubuntu16.04下安装openssh-server报依赖错误的解决方法 (2)https://ww ...

  8. wepe 装linux ubuntu,Ubuntu16.04下安装Wechat的实现方法

    Ubuntu16.04下安装Wechat 很久没写博客了,前两天电脑因为teamviewer不了,原因显示是libqt5gui5版本过低,研究了一波更新,卸载了libqt5gui5,和它的依赖qtba ...

  9. (已解决)ubuntu16.04蓝牙耳机与电脑配对成功,但不出现在声音输出设备里

    (已解决)ubuntu16.04蓝牙耳机与电脑配对成功,但不出现在声音输出设备里 Ubuntu 16.04 + 小米1000XM3蓝牙耳机 问题:电脑与蓝牙耳机配对成功.连接成功,但是声音设备里只有电 ...

最新文章

  1. 【No.9 内存泄漏了么】
  2. 黑马程序员 - 接口、内部类和异常
  3. nginx配置长连接
  4. 静态成员变量及方法的调用
  5. android 断开蓝牙连接,如何在android中连接和断开扬声器蓝牙
  6. 如何删除pdf中计算机属性,PDF文件做好后怎么修改
  7. Spring 依赖注入(一、注入方式)
  8. 谈谈我在自然语言处理进阶上的一些个人拙见
  9. C语言-简谱转换成哨笛指谱
  10. 计算机中的振动原理,机械振动
  11. [C++] [FLTK] 很久以前写的FLTK计算器
  12. 电子元器件解析01——电阻
  13. 135编辑器html怎么复制,微信公众号怎么复制别人的图文排版(图文模板复制方法)...
  14. VR全景制作教程|VR全景拍摄和制作竟如此简单
  15. 博士申请 | 美国北卡州立大学郭志山教授招收机器学习方向全奖博士生
  16. 求购二手《良葛格Java JDK 5.0学习笔记》
  17. sketch和zeplin
  18. 蒲公英 · JELLY技术周刊 Vol.26: 请问您这个月要来点肝么?
  19. dhcp snooping华为_华为交换机DHCP snooping
  20. Ajax.NET中的ajax.js脚本

热门文章

  1. 记一次失败的菠菜网站渗透测试
  2. 抓取摩拜单车API数据,并做可视化分析
  3. 30+男生程序员中年如何破局
  4. Easy Crypto 专题总结
  5. tsconfig.json
  6. kdevelop汉化
  7. 微信小程序——修改field输入框内文字颜色和背景图透明度调整
  8. HTML+CSS构建移动登录界面
  9. mybatis中解决属性名和字段名不一致的方法
  10. springboot自定义注解收集操作日志