rosdep update Name or Service unknow 问题解决方案

在Ubuntu 18.04 下安装 ros melodic rosdep update 这一步出现一直出现Name or Service unknow 的问题

1.首先在 /etc/hosts 文件中添加一行
151.101.84.133 raw.githubusercontent.com

2.依次执行以下命令
sudo su
sed -i “s/raw.githubusercontent.com/raw.ctl.app/g” /usr/lib/python2.7/dist-packages/rosdistro/init.py

sed -i “s/raw.githubusercontent.com/raw.ctl.app/g” /usr/lib/python2.7/dist-packages/rosdistro/manifest_provider/github.py

sed -i “s/raw.githubusercontent.com/raw.ctl.app/g” /usr/lib/python2.7/dist-packages/rosdep2/rep3.py

sed -i “s/raw.githubusercontent.com/raw.ctl.app/g” /usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py

3.在root权限下再次执行rosdep update

4.出现time out 问题,换用手机热点即可

问题解决

你可能感兴趣的:(rosdep update Name or Service unknow 问题解决方案)