Ubuntu 18 安装ROS提高命中率
2022-02-16 本文已影响0人
yuanthu
如果失败,改大延迟,提高 rosdep update命中率
sudo apt update
打开 sudo nano sources_list.py
cd /usr/lib/python2.7/dist-packages/rosdep2
sudo nano sources_list.py
DEFAULT_SOURCES_LIST_URL = 'https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'
将DOWNLOAD_TIMEOUT 增大
DOWNLOAD_TIMEOUT = 300.0
image.png
还是在/usr/lib/python2.7/dist-packages/rosdep2目录下, 打开sudo nano rep3.py
将DOWNLOAD_TIMEOUT延时15更改为300
cd /usr/lib/python2.7/dist-packages/rosdistro$ ,对init.py原先DEFAULT_INDEX_URL前端加入https://ghproxy.com/,即如下:
cd /usr/lib/python2.7/dist-packages/rosdistro
sudo nano __init__.py
image.png
sudo gedit /etc/resolv.conf,将原有的nameserver这一行注释,并添加以下两行:
sudo gedit /etc/resolv.conf
新增域名:
nameserver 8.8.8.8 #google域名服务器
nameserver 8.8.4.4 #google域名服务器