错误1:
ERROR: default sources list file already exists: /etc/ros/rosdep/sources.list.d/20-default.list Please delete if you wish to re-initialize
错误2:
ERROR: cannot download default sources list from: https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down.
目前为止,下面方法对于以上两种错误都可以解决
第一步:
cd /usr/lib/python3/dist-packages/
第二步:
find . -type f | xargs grep "raw.githubusercontent"
第三步:
找到以下文件,并将相关文本替换
第一个文件
sudo gedit ./rosdistro/__init__.py
将DEFAULT_INDEX_URL后面的网站换成
'https://gitee.com/zhao-xuzuo/rosdistro/raw/master/index-v4.yaml'
第二个文件
sudo gedit ./rosdep2/gbpdistro_support.py
将FUERTE_GBPDISTRO_URL后面的网站换成
'https://gitee.com/zhao-xuzuo/rosdistro/raw/master/releases/fuerte.yaml'
第三个文件
sudo gedit ./rosdep2/sources_list.py
将DEFAULT_SOURCES_LIST_URL后面的网站换成
'https://gitee.com/zhao-xuzuo/rosdistro/raw/master/rosdep/sources.list.d/20-default.list'
第四个文件
sudo gedit ./rosdep2/rep3.py
将REP3_TARGETS_URL后面的网站换成
'https://gitee.com/zhao-xuzuo/rosdistro/raw/master/releases/targets.yaml'
OK
sudo rosdep init
rosdep update