解决rosdep init,rosdep update遇到的问题

news/2025/2/22 11:24:33

1、查看raw.githubusercontent.com的ip地址

可以在Hostname Summary查看raw.githubusercontent.com的ip地址.如图
在这里插入图片描述

2、配置host文件

sudo gedit /etc/hosts

加入

185.199.110.133 raw.githubusercontent.com
185.199.110.133  raw.github.com

以上步鄹可以解决如下问题

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.

2.1 执行rosdep init

rosdep init

*当rosdep init以后在rosdep update过程中会遇到下载问题

3、修改sources.list.d的访问方式

3.1 使用wget下载需要的文件

wget https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
wget https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
wget https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
wget https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
wget https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml 
wget https://raw.githubusercontent.com/ros/rosdistro/master/melodic/distribution.yaml
 wget https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml

3.2 改变sources.list.d中的下载方法

# os-specific listings first
yaml file:///home/lvrobot/osx-homebrew.yaml osx

# generic
yaml file:///home/lvrobot/base.yaml
yaml file:///home/lvrobot/python.yaml
yaml file:///home/lvrobot/ruby.yaml
gbpdistro file:///home/lvrobot/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

3.3 修改osdep2/sources_list.py

在 sources_list.py中加入

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

以上可以解决rosdep update下载问题

4、执行

rosdep update
  • 切记要多次尝试

http://www.niftyadmin.cn/n/919129.html

相关文章

CSDN学霸课表——一切皆为 JavaScript

《一切皆为 JavaScript》凡是可以用 JavaScript 来写的应用,最终都会用 JavaScript 来写。 ——Atwood定律(Jeff Atwood在2007年提出)►阅读全文 javascript案例大全讲师:张鹏 本课程为javascript案例实战课程,讲述案…

try catch finally的应用

在使用try catch finally时,有时会出现upexcepted exception ... 这里就是你的try块写得有问题了。可能是由于需要 try catch的地方,你没有使用。下面的一个是正常的。 private void QuearyDB(String strSQL)

CSDN学霸课表——学习NodeJS第一天

《学习NodeJS第一天:node.js引言》Node.js 是资深 C 程序员 Ryan Dahl(http://four.livejournal.com/)的作品,依据 Google 著名的开源 JavaScript 引擎 V8 来进行二次开发的 Web I/O 服务器(http://nodejs.org/&#x…

CSDN学霸课表——Project 2013产品套装对应的六个产品

《 Project 2013产品套装对应的六个产品详细信息》最新开始公测的Project2013产品套装中,多达6个产品,分别对应如下: ►阅读全文 Project快速上手(规划项目)讲师:游峰 本课程是Project的基础课程&#xff0…

must be caught or declared to be thrown

must be caught or declared to be thrown这种情况的问题: 主要有可能是应该try得没有使用。 比如驱动的装载等。

ROS Robotics By Example No transform from [left_wheel] to [base_link]

1、问题描述 在第二章中搭建双轮机器人 <?xml version"1.0"?> <robot name"dd_robot"><!-- base link--><link name"base_link"><visual><origin xyz"0.0 0.0 0.0" rpy"0.0 0.0 0.0"/…

CSDN学霸课表——把Word的默认背景颜色由白色改为绿色

《如何把Word的默认背景颜色由白色改为绿色》对于经常打字的朋友&#xff0c;把页面颜色改为绿色&#xff0c;对眼睛还是大有好处的&#xff0c;若每次启动Word后都手工修改则比较麻烦。下面介绍一种通过替换掉原有的Normal.dotm的方法&#xff0c;把Word的页面颜色一劳永逸地换…

CSDN学霸课表——144项大神级ppt制作技术

《144项大神级ppt制作技术》PPT&#xff08;PowerPoint&#xff09;制作原则之&#xff1a;Magic Seven原则&#xff08;7士2&#xff1d;5&#xff5e;9&#xff09;。 PPT&#xff08;PowerPoint&#xff09;制作原则之&#xff1a;KISS (Keep It Simple and Stupid)原则。 …