sudo rosdep init 出现 ERROR: cannot download default sources list from:错误解决方法
关于安装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:错误解决方法的更多相关文章
- ubuntu 使用sudo apt-get update 出现 被配置多次导致无法升级错误解决方法
这个周六周末在考虑升级自己GPU开发机,在琢磨使用docker来配置tensorflowGPU环境,在升级软件的时候爆出了如下错误 在 /etc/apt/sources.list.d/sogoupin ...
- ROS常见问题(一) 安装ROS时sudo rosdep init指令报错 最全解决方法
安装ROS时sudo rosdep init指令报错: ERROR: cannot download default sources list from: https://raw.githubuser ...
- NVidia Jetson Ubuntu 18.04 安装ROS过程中运行sudo rosdep init指令出错
参考:https://www.cnblogs.com/xuhaoforwards/p/9399744.html 安装ROS过程中运行sudo rosdep init后,出现如下错误LOG: ERROR ...
- ubuntu下ROS安装时sudo rosdep init和rosdep update的解决方法
问题: 在ubuntu上多次安装matlab选择合适的版本来调用摄像头,终于把系统搞坏了,重装系统后,ROS无法安装,每次安装到sudo rosdep init和rosdep update报错的问题, ...
- Ubuntu 16.04 安装ROS sudo rosdep init报错问题
解决博文:https://blog.csdn.net/weixin_37835458/article/details/79878785 输入sudo rosdep init报错如下: Tracebac ...
- 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 ...
- git rebase与 git合并(error: failed to push some refs to)解决方法
1.遇到的问题 本地有一个git仓库,在github上新建了一个空的仓库,但是更新了REWADME.md的信息,即在github上多了一个提交. 关联远程仓库,操作顺序如下: git remote a ...
- 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 ...
- Hadoop Error:Name node is in safe mode的解决方法
Error:name node is in safe mode 解决方法:hadoop dfsadmin -safemode leave(见图)
随机推荐
- Linux Shell脚本_关闭防火墙
转至:https://blog.csdn.net/weixin_40816738/article/details/105244851 ① 脚本编写创建脚本 vim closeFirewall.sh 添 ...
- spring boot application.yml 常用基本配置
1.Tomcat 配置 server: #设置请求端口 port: 8080 servlet: #指定 Tomcat的请求路径 context-path: /cl #设置 Tomcat 编码格式 en ...
- java复习面向对象(二)
java复习面向对象(二) 1.static关键字 举例图片 静态变量 使用static修饰的成员变量是静态变量 如果一个成员变量使用了关键字static,那么这个变量不属于对象自己,而属于所在的类多 ...
- WPF优秀组件推荐之Stylet(一)
一.简介 Stylet是基于WPF的一款MVVM组件,虽然WPF本身是自带MVVM功能的,但实现起来不是很方便 ,通过Stylet,用户可以用很少的代码就能享受MVVM带来的舒适体验. 目前Style ...
- boostrap的select2自动换行的问题解决
最近在使用boostrap的select2控件实现多选效果时发现一个问题正常效果:但是当选择了两个长一些的option时,发现select2莫名其妙的换了一行空白行:经过F12调试发现是因为selec ...
- 【行业Tip】三电是什么
电动汽车的"三电"是指:电池.电机.电控.
- Casbin入选2022 Google编程之夏
Casbin入选2022 Google编程之夏! Google编程之夏(Google Summer of Code,GSoC),是由Google公司所主办的年度开源程序设计项目,第一届从2005年开始 ...
- .NET MAUI 已在塔架就位 ,4月份RC
最美人间三月天,春光不负赶路人.在充满无限希望的明媚春天里,一路风雨兼程的.NET 团队正奋力实现新的突破. 根据计划,新一代移动开发平台MAUI 将于4月份 发布RC. 目前,MAUI的测试工作和火 ...
- 【基础】tail命令查看日志
一.tail 命令介绍 tail 命令可以将文件指定位置到文件结束的内容写到标准输出. 如果你不知道tail命令怎样使用,可以在命令行执行命令tail --help就能看到tail命令介绍和详细的参数 ...
- spring——整合Mybatis
一.Mybatis整合spring 步骤: 导入相关jar包 junit mybatis mysql数据库 spring-webmvc aop织入 mybatis-spring spring-jdbc ...