解决rosdep init报错“Website may be down”

解决rosdep init报错“Website may be down”

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml

ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:

网上看了很多方法:

https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list - gary_123 - 博客园

https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list_Ericztoa的博客-CSDN博客

sudo rosdep init报错的解决方式_PuerAloe的博客-CSDN博客_sudorosdepinit报错

解决rosdep init报错“Website may be down” - 知乎

以及查找路由,Hosts里面设置。更换网络等等,就差买个vpn了。都不行。

总结: 不是方法有误,而是写的不详细:

方案如下:

1. 下载 git clone https://github.com/ros/rosdistro.git 到home路径里

2. 设置,找不到找找python2.7,这个跟python主要版本有关,灵活点

xx@xx:/usr/lib/python3/dist-packages/rosdep2$ sudo gedit rep3.py
xx@xx:/usr/lib/python3/dist-packages/rosdep2$ sudo gedit sources_list.py

xx@xx:/usr/lib/python3/dist-packages/rosdep2$ sudo gedit gbpdistro_support.py

https://raw.githubusercontent.com/ros/rosdistro/master
替换为
file:///home/bozhon/rosdistro

可以检查一下,把能社会的都设置了

3. 设置(很重要,不然老有一个东西找index-v4.yaml或者其他文件)

xx@xx:/usr/lib/python3/dist-packages/rosdistro$ sudo gedit __init__.py

https://raw.githubusercontent.com/ros/rosdistro/master
替换为
file:///home/bozhon/rosdistro

4.  如果有,则删除

xx@xx:/etc/ros/rosdep/sources.list.d$ sudo rm -rf 20-default.list

5.  sudo rosdep init

6.  进入下载的rosdistro/rosdep/sources.list.d更改  gedit 20-default.list

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

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

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

 7.   成功

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit file:///home/xx/rosdistro/rosdep/osx-homebrew.yaml
Hit file:///home/xx/rosdistro/rosdep/base.yaml
Hit file:///home/xx/rosdistro/rosdep/python.yaml
Hit file:///home/xx/rosdistro/rosdep/ruby.yaml
Hit file:///home/xx/rosdistro/releases/fuerte.yaml
Query rosdistro index file:///home/xx/rosdistro/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"
Add distro "galactic"
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/xx/.ros/rosdep/sources.cache

说明:1.    /home/xx: 是home路径,rosdistro我直接下载到home路径下。  注意路径

          2. 过程中,老有些地方指示到: https://raw.githubusercontent.com,说明没有改。

         3. 我换了两个手机热点,都不行,但是也学习到了比如使用工具查找ip

    还是感谢网络上分享的同学

我的电脑是Ubuntu20.04,使用的python3,如果没有Python3的话可能是低版本Ubuntu,请找python2.7

欢迎交流

email: tongzhuodenilove@163.com

        

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
这个问题可能是由于网络连接问题或者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需要的依赖包。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值