ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
<urlopen error [Errno 104] Connection reset by peer> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
先后尝试了更换热点、通过sudo gedit /etc/hosts增加github访问IP等方法都未成功,最终通过下载更新源网址对应的文件到本地电脑,将网络路径改成本地文件路径后,成功执行rosdep update。 参考网址: https://hm.ru/L4JATz
~/下载
路径下,并将起解压到/etc/ros/路径内,具体命令如下:cd /etc/ros/
sudo cp ~/下载/ros_github.zip ./
sudo unzip ros_github.zip
下载链接:https://pan.baidu.com/s/1PhTCqtvScV_XGf9ac0CcCg 提取码: w3ix
sudo gedit /usr/lib/python3/dist-packages/rosdistro/__init__.py
# zlm: DEFAULT_INDEX_URL is changed to rosdep update
#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///etc/ros/ros_github/index-v4.yaml'
文件中的修改截图如下:
注意:ubuntu18.04系统中ROS melodic版本的rosdep update失败错误,也可以采用本教程中的方法,但是注意noetic版本默认采用python3编译,melodic及先前的ROS版本,默认使用python2编译,因此对应上述版本ROS,此步骤中的文件路径为
/usr/lib/python2.7/dist-packages/rosdistro/__init__.py
。
sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list
将之前的配置注释,复制以下文本,粘贴后保存。# os-specific listings first
yaml file:///etc/ros/ros_github/osx-homebrew.yaml osx
# generic
yaml file:///etc/ros/ros_github/base.yaml
yaml file:///etc/ros/ros_github/python.yaml
yaml file:///etc/ros/ros_github/ruby.yaml
gbpdistro file:///etc/ros/ros_github/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
文件20-default.list中的内容截图如下:
本文章使用limfx的vscode插件快速发布