rosdep init & rosdep update 失败接方法
rosdep init
报错示例:
RROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
修改hosts
sudo vim /etc/hosts
在最后一样加入
151.101.84.133 raw.githubusercontent.com
# 这个ip 可能不行,可以去https://www.ipaddress.com/输入raw.githubusercontent.com查找新的ip
rosdep update
- 下载rosdistro
git clone https://github.com/ros/rosdistro.git
- 下载后放到这个目录
/home/<username>/rosdistro
# <username>就是你的用户名字
eg:
/home/yunhgu/rosdistro
- 修改/usr/lib/python2.7/dist-packages/rosdep2/rep3.py文件
cd /usr/lib/python2.7/dist-packages/rosdep2
sudo vim rep3.py
将REP3_TARGETS_URL = ‘https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml’
替换成 REP3_TARGETS_URL = 'file:///home/yunhgu/rosdistro/releases/targets.yaml'
替换后的/home/yunhgu 即为第一步clone内容的存放地址
- 修改/usr/lib/python2.7/dist-packages/rosdistro/init.py文件
将原来文件中的 DEFAULT_INDEX_URL = ‘https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml’
替换成 DEFAULT_INDEX_URL = 'file:///home/yunhgu/rosdistro/index-v4.yaml'
替换后的/home/yunhgu 即为第一步clone内容的存放地址
- 修改/etc/ros/rosdep/sources.list.d/20-default.list
内容如下
# os-specific listings first
yaml file:///home/yunhgu/rosdistro/rosdep/osx-homebrew.yaml osx
# generic
yaml file:///home/yunhgu/rosdistro/rosdep/base.yaml
yaml file:///home/yunhgu/rosdistro/rosdep/python.yaml
yaml file:///home/yunhgu/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/yunhgu/rosdistro/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
- 运行
rosdep update
方案二
不论你在什么时候开始,重要的是开始之后就不要停止。
不论你在什么时候结束,重要的是结束之后就不要悔恨。
分类:
ros
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix