2021.04 rosdep init、rosdep update 失败解决方法

PC:联想小新13pro CPU:R5-3550H

虚拟机:vmware 16 pro + Ubuntu 18.04.5

源:阿里云

是否有魔法:有

目标ROS:Melodic

2021.04 列举网上尝试过的方法:

rosdep init、rosdep update出现的问题:

1、找不到命令。

sudo apt-get install python-rosdep

2、init、update 连接问题网上列举的解决方法:

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.

 a、rosdep init失败,手动在相应目录添加文件后使用rosdep update:

sudo vim /etc/ros/rosdep/sources.list.d/20-default.list

# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

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

b、rosdep update失败 - nameserver:

sudo gedit /etc/resolv.conf

将原有的nameserver这一行注释,并添加以下两行:

nameserver 8.8.8.8 #google域名服务器

nameserver 8.8.4.4 #google域名服务器

c、rosdep update失败 - HOSTS

sudo vim /etc/hosts

# 在最后一行添加 这个IP地址在 
# https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com
# 进行查询的

185.199.108.133 raw.githubusercontent.com

d、rosdep update失败 - 修改gbpdistro超时时间

sudo vim /usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py

# 找到 DOWNLOAD_TIMEOUT = 15.0 对数值进行调大一些
DOWNLOAD_TIMEOUT = 45.0

e、rosdep update失败 - 使用手机建立的WiFi热点

f、 rosdep update失败 - 换apt-get源

阿里云、清华、华为 等

3、我尝试的新方法:

1.首先我是打不开这个 https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com 网址的

原因是我用虚拟机的代理DNS没有设置

2. rosdep fix-permissions ,不知道干嘛的反正就是莫明奇妙:

zhangqing@ubuntu:~$ rosdep fix-permissions
Recursively changing ownership of ros home directory '/home/zhangqing/.ros' to 'zhangqing:zhangqing' (current user)...
Done.
zhangqing@ubuntu:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/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"
Add distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Add distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/zhangqing/.ros/rosdep/sources.cache

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值