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(见图)
随机推荐
- Qt:foreach
0.说明 Qt提供一个关键字foreach(实际上是<QtGlobal>中定义的一个宏)用于方便地访问容器中的所有数据项. foreach关键字用于遍历容器中的所有数据项 注意 forea ...
- python hex转flaot
在使用树莓派 modbus-tk 读取寄存器值后,得到的4byte值存为了元组,想将该数据转化为float,习惯了c的用法,转到python时,数据转换这一块一头雾水,经过多次尝试最终实现.记录一下: ...
- laravel中{{}}和{!! !!}的区别详解
{{}}支持转义 一段html代码只是被当成普通的字符串输出 {!! !!} 不支持转义 一段html代码可以被正常的解析 public function html(){ $address=" ...
- egg-jwt的使用
安装 npm install egg-jwt --save 配置 // config/config.default.js config.jwt = { secret: 'zidingyi', // 自 ...
- yum 安装时报错 Existing lock /var/run/yum.pid: another copy is running as pid 3192.
yum 安装时报错 由于yum的时候意外退出造成的,虽然也给出提示当前占用进行的id,但是执行kill -9 强制杀死进程后,情况没能改变. 解决方法:rm -f /var/run/yum.pid然 ...
- 网络编程 并发socketserver
网络编程 并发socketserver ipv4.ipv6 ip协议:规定网络地址的协议 B/S架构 C/S架构 bs是cs的一种 B/S是浏览器和服务端架构 C/S是客户端和服务端架构 osi七层协 ...
- linux内存(一) 内核空间与用户空间
来自如下网站 https://www.cnblogs.com/sparkdev/p/8410350.html 内核空间和用户空间 对 32 位操作系统而言,它的寻址空间(虚拟地址空间,或叫线性地址空间 ...
- Java基础——方法的调用
Java基础--方法的调用 总结: 1. 在同一个类中-- 对于静态方法,其他的静态和非静态方法都可以直接通过"方法名"或者"类名.方法名"调用它. 对 ...
- Windows安全加固手册
1 身份鉴别 1.1 密码安全策略 要求:操作系统和数据库系统管理用户身份鉴别信息应具有不易被冒用的特点,口令应有复杂度要求并定期更换. 目的:设置有效的密码策略,防止攻击者 ...
- 常见的反爬措施:UA反爬和Cookie反爬
摘要:为了屏蔽这些垃圾流量,或者为了降低自己服务器压力,避免被爬虫程序影响到正常人类的使用,开发者会研究各种各样的手段,去反爬虫. 本文分享自华为云社区<Python爬虫反爬,你应该从这篇博客开 ...