手动完成sudo rosdep init
步骤一:首先打开一个终端,执行以下指令创建root并切换至root用户
sudo passwd //接着提示输入UNIX密码,输入你的用户密码即可
sudo su //或者su root 然后输入密码切换至root用户
sudo mkdir -p /etc/ros/rosdep/sources.list.d
cd /etc/ros/rosdep/sources.list.d
sudo gedit 20-default.list
步骤二:将以下内容复制进20-default.list文件中
# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yamlyaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yamlyaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yamlgbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
步骤三:执行以下指令
exit //退出root用户
rosdep update
备用方案:
如果依旧报错 ,下载下面文件到linux系统中,
解压后cd到对应目录。按Ctrl+Alt+T打开一个终端,切换为root用户。输入sh rosdep_update.sh指令运行rosdep_update.sh脚本
sudo su
sh rosdep_update.sh
然后运行
exit //推出管理员模式
rosdep update
成功后会有如下界面
如果通过此方案,解决了你遇到的问题,方便的话,请点赞加收藏,方便后面发现这篇文章的人能够相信本文的真实性与可行性。愿各位在学习与科研的道路上,一帆风顺!
----------------------------------------------------
如有侵权,联系删除