sudo rosdep init出现的错误

在系统上安装ROS 

在运行

 sudo rosdep init  

  ERROR: default sources list file already exists:
  /etc/ros/rosdep/sources.list.d/20-default.list
  Please delete if you wish to re-initialize

分析原因:国内的长城防火墙,对数据进行了拦截无法获取

解决方案1:

  使用手机热点。

  sudo rosdep init 

  rosdep update

  总体的消耗的流量不多,并且一直成功。

解决方案2:

  手动添加/etc/ros/rosdep/sources.list.d/20-default.list

  在终端输入:

 sudo mkidr -p /etc/ros/rosdep/sources.list.d

   cd  /etc/ros/rosdep/sources.list.d

  sudo gedit 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

之后运行:

 rosdep update

在运行的过程之中,也许还是会出现外网连接失败,这个时候强烈建议使用“手机热点

你可能感兴趣的:(ROS)