关于安装ROS时出现的rosdep init错误

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.

解决办法

第一步

网上很多都说在/etc/hosts文件里加各种IP什么的,但是好像因为翻不了墙所以无法使用,最后试了好多种方法发现其中一个博主的方法是很可靠的。
先去百度连接下载文件,https://pan.baidu.com/s/1hKFJp_PQaela6i7RMOh5ZA,提取码:bryv
下载后将文件放入ubuntu的一个文件夹下。

第二步

修改这个包中rosdep/source.list.d/下的文件20-default.list,将这个文件中指向raw.githubusercontent.com的url地址全部修改为指向本地文件的地址,也就是该下载好的包的地址,可以进入rosdistro-master的文件夹中的rosdep中的sources.list.d中,在终端输入pwd查看路径,将路径复制,再修改20-default.list中的内容。

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

注意是file://+路径;

第三步

进入/usr/lib/python2.7/dist-packages/rosdep2该文件夹下面的sources_list.py文件里面。而这个文件里面的代码则进行了访问raw.githubusercontent.com的操作,因此修改该默认url即可。以下是样例:

# default file to download with 'init' command in order to bootstrap
# rosdep
DEFAULT_SOURCES_LIST_URL = 'file:///home/xxx/rosdep/sources.list.d/20-default.list' # seconds to wait before aborting download of rosdep data

第四步

修改以下两个文件里面的代码:

/usr/lib/python2.7/dist-packages/rosdep2/rep3.py
/usr/lib/python2.7/dist-packages/rosdistro/__init__.py

分别是

# location of targets file for processing gbpdistro files
REP3_TARGETS_URL = 'file:///home/xxx/releases/targets.yaml'
# seconds to wait before aborting download of gbpdistro data
# index information
DEFAULT_INDEX_URL = 'file:///home/xxx/index-v4.yaml'
def get_index_url():

这个文件是在rosdistro-master中,不需要进入子目录。

最后

然后进行sudo rosdep init :
激动人心的时刻来了:

成功!

原文链接:https://blog.csdn.net/qq_43046763/article/details/116225256

sudo rosdep init 出现 ERROR: cannot download default sources list from:错误解决方法的更多相关文章

  1. ubuntu 使用sudo apt-get update 出现 被配置多次导致无法升级错误解决方法

    这个周六周末在考虑升级自己GPU开发机,在琢磨使用docker来配置tensorflowGPU环境,在升级软件的时候爆出了如下错误 在 /etc/apt/sources.list.d/sogoupin ...

  2. ROS常见问题(一) 安装ROS时sudo rosdep init指令报错 最全解决方法

    安装ROS时sudo rosdep init指令报错: ERROR: cannot download default sources list from: https://raw.githubuser ...

  3. NVidia Jetson Ubuntu 18.04 安装ROS过程中运行sudo rosdep init指令出错

    参考:https://www.cnblogs.com/xuhaoforwards/p/9399744.html 安装ROS过程中运行sudo rosdep init后,出现如下错误LOG: ERROR ...

  4. ubuntu下ROS安装时sudo rosdep init和rosdep update的解决方法

    问题: 在ubuntu上多次安装matlab选择合适的版本来调用摄像头,终于把系统搞坏了,重装系统后,ROS无法安装,每次安装到sudo rosdep init和rosdep update报错的问题, ...

  5. Ubuntu 16.04 安装ROS sudo rosdep init报错问题

    解决博文:https://blog.csdn.net/weixin_37835458/article/details/79878785 输入sudo rosdep init报错如下: Tracebac ...

  6. Ubuntu下 fatal error: Python.h: No such file or directory 解决方法

    参考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such file or ...

  7. git rebase与 git合并(error: failed to push some refs to)解决方法

    1.遇到的问题 本地有一个git仓库,在github上新建了一个空的仓库,但是更新了REWADME.md的信息,即在github上多了一个提交. 关联远程仓库,操作顺序如下: git remote a ...

  8. Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法

    Eclipse 出现Some sites could not be found.  See the error log for more detail.错误 解决方法 Some sites could ...

  9. Hadoop Error:Name node is in safe mode的解决方法

    Error:name node is in  safe mode 解决方法:hadoop dfsadmin -safemode leave(见图)

随机推荐

  1. Redis 7.0 新功能新特性总览

    说明:本文根据Redis 7 RC2 的release note 整理并翻译 近日,Redis 开源社区发布了7.0的两个预览版.在这两个预览版中,有很多Redis 7.0中新增加的特性,新增加的命令 ...

  2. oj教程--向量容器

    vector向量容器不但像数组一样对元素进行随机访问,还能在尾部插入元素,是一个简单.高效的容器, 完全可以替代数组.vector具有内存自动管理的功能,对于元素的插入和删除,可动态调整所占用的内存空 ...

  3. 千万级 PV是什么意思?

    首先介绍下pv的概念: PV(访问量):即Page View,页面刷新一次算一次. UV(独立访客):即Unique Visitor,00:00-24:00内相同的客户端只被计算一次. IP(独立IP ...

  4. mybatis介绍--基于个人学习JavaWeb的使用

    mybatis介绍 该博文放在javaWeb系列下,目的是记录我们javaWeb阶段所学的知识 @time=2022/3/11/11:52(最近休息玩了两天,今天重新启动生活) 一.mybatis发展 ...

  5. Dapr 弹性的策略

    云原生应用需要处理 云中很容易出现瞬时故障.原因在以下文档 暂时性故障处理[1] 中有具体说明. 任何环境.任何平台或操作系统以及任何类型的应用程序都会发生暂时性故障. 在本地基础结构上运行的解决方案 ...

  6. 1.java连接pulsar服务

    目录 是什么 安装 Java客户端 1.引入GAV 2.创建配置项 3.验证测试 其他及代码下载 是什么 Pulsar 是一个用于服务器到服务器的消息系统,具有多租户.高性能等优势.详见 安装 本文主 ...

  7. linux文件目录权限操作

    设置修改文件的属主或修改文件属组 [root@localhost ~]# ll test.txt -rw-r--r--. 1 root root 0 Oct 21 12:01 test.txt [ro ...

  8. Laravel-自带分页+搜索

    public function getNewsList(){ $condition = []; $cond = []; if (!empty($_GET['title'])) { array_push ...

  9. LGP5544题解

    题目大意 题意这么明显就不说了qwq 首先最值,而且也想不到啥解法,果断 \(\rm SA\). 然后是初始位置.初始位置就是 \(((\sum_{i=1}^m x)/m,(\sum_{i=1}^m ...

  10. TypeScript方法的定义

    在 JavaScript 中,有两种方式定义方法. 1.命名的方法 function add(x,y){ return x+y;}2.匿名方法 var myAdd = function(x,y) { ...