如果提示的是
ERROR: unable to process source https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/xxxxx
之類的錯誤,同時保證自己機器可以上百度的前提下,此時可能是因為raw.githubusercontent.com網站被牆了。
解決辦法是修改hosts文件,添加這個網站的ip地址
#打開hosts文件 sudo gedit /etc/hosts #在文件末尾添加 151.101.84.133 raw.githubusercontent.com #保持后退出再嘗試