本文主要是介绍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
这篇关于2021.04 rosdep init、rosdep update 失败解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!