rosdep update出现Website may be down

rosdep update问题解决方案

1.我的rosdep init成功,如果失败执行

sudo mkdir -p /etc/ros/rosdep/sources.list.d
cd /etc/ros/rosdep/sources.list.d
sudo touch 20-default.list

2.在github下载ros的相关代码下载目录
解压缩后放在任意目录下
3.修改步骤1中的20-default.list文件,主要是改网站为本地目录

# os-specific listings first
yaml file:///home/xxx/rosdistro/rosdep/osx-homebrew.yaml osx

# generic
yaml file:///home/xxx/rosdistro/rosdep/base.yaml
yaml file:///home/xxx/rosdistro/rosdep/python.yaml
yaml file:///home/xxx/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/xxx/rosdistro/releases/fuerte.yaml fuerte

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

4…修改在__init__.py文件中修改index-v4.yaml的位置
在shell下执行命令sudo vim /usr/lib/python3/dist-packages/rosdistro/__init__.py

#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///etc/ros/rosdistro/index-v4.yaml'

再修改sudo vim /usr/lib/python3/dist-packages/rosdep2/rep3.py

# location of targets file for processing gbpdistro files
#REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'
REP3_TARGETS_URL = 'file:///etc/ros/rosdistro/releases/targets.yaml'

5.执行rosdep update

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个问题可能是由于网络连接问题或者rosdep服务器宕机导致的。你可以尝试以下几个步骤: 1. 检查你的网络连接是否正常,尝试使用ping命令测试rosdep服务器是否可达。如果网络连接不正常,可以尝试重新连接网络或者更换网络环境。 2. 确认rosdep服务器是否宕机,可以尝试在浏览器中访问rosdep服务器的网站,如果无法访问,说明rosdep服务器宕机了。这种情况下你需要等待服务器恢复,或者尝试更换其他可用的rosdep服务器。 3. 如果以上两个方法都无法解决问题,你可以尝试手动配置rosdep的源地址。打开终端,输入以下命令: ``` sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list ``` 这个命令将会打开rosdep的默认源地址配置文件。你可以在该文件中将默认的源地址注释掉,并添加其他可用的源地址,例如: ``` # rosdep default sources.list file # Uncomment the following line to substitute one easy to access repository for the default #yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml yaml https://mirrors.tuna.tsinghua.edu.cn/ros/rosdep/base.yaml ``` 在上面的例子中,我们将默认的源地址注释掉了,并添加了清华大学的源地址。你可以根据自己的需求添加其他可用的源地址。然后保存文件并关闭编辑器。 4. 最后,你可以尝试使用以下命令更新rosdep: ``` sudo rosdep update ``` 这个命令将会更新rosdep的源地址,并重新下载rosdep需要的依赖包。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值