出现问题:
解决方案:
尝试了好多解决方案,最后总结如下:
在本地新建对应目录/etc/ros/rosdep/sources.list.d
$ sudo mkdir -p /etc/ros/rosdep/sources.list.d
- 1
并定位到该目录:
$ cd /etc/ros/rosdep/sources.list.d
- 1
新建文件20-default.list:
$ sudo gedit 20-default.list
- 1
将上面打开网页中的内容复制粘贴到新建打开的文档中:
# os-specific listings first
yaml https://raw.github.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.github.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.github.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
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
保存,关闭文件。
在终端运行:
rosdep update
- 1
这里如果成功会得到以下信息。
不过到这里,我失败了,得到以下错误,
好处是错误有了变化,继续解决。
sudo gedit /etc/resolv.conf
- 1
将原有的nameserver这一行注释,并添加以下两行:
nameserver 8.8.8.8 #google域名服务器
nameserver 8.8.4.4 #google域名服务器
- 1
- 2
- 3
保存退出,执行
sudo apt-get update
- 1
再执行
rosdep update
出现:
可以啦。
成功了之后,可以再改回去,防止以后因为这里出现类似错误。
参考网址:
https://blog.csdn.net/u013468614/article/details/102917569
https://blog.csdn.net/mrh1714348719/article/details/103803110
评论(0)
您还未登录,请登录后发表或查看评论