ERROR: Rosdep experienced an error: Could not detect OS

ERROR: Rosdep experienced an error: Could not detect OS

错误信息

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro “ardent”
Skip end-of-life distro “bouncy”
Skip end-of-life distro “crystal”
Add distro “dashing”

ERROR: Rosdep experienced an error: Could not detect OS, tried [‘zorin’, ‘windows’, ‘nixos’, ‘clearlinux’, ‘ubuntu’, ‘slackware’, ‘rhel’, ‘qnx’, ‘pop’, ‘osx’, ‘sailfishos’, ‘tizen’, ‘opensuse’, ‘opensuse’, ‘opensuse’, ‘opensuse’, ‘openembedded’, ‘neon’, ‘mx’, ‘mint’, ‘linaro’, ‘gentoo’, ‘funtoo’, ‘freebsd’, ‘fedora’, ‘elementary’, ‘elementary’, ‘debian’, ‘cygwin’, ‘centos’, ‘manjaro’, ‘arch’, ‘alpine’]
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdep

rosdep version: 0.19.0

Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/rosdep2/main.py”, line 144, in rosdep_main
exit_code = _rosdep_main(args)
File “/usr/lib/python2.7/dist-packages/rosdep2/main.py”, line 428, in _rosdep_main
return _no_args_handler(command, parser, options, args)
File “/usr/lib/python2.7/dist-packages/rosdep2/main.py”, line 437, in _no_args_handler
return command_handlerscommand
File “/usr/lib/python2.7/dist-packages/rosdep2/main.py”, line 649, in command_update
ros_distro=options.ros_distro)
File “/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py”, line 507, in update_sources_list
rosdep_data = get_gbprepo_as_rosdep_data(dist_name)
File “/usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py”, line 150, in get_gbprepo_as_rosdep_data
ctx = create_default_installer_context()
File “/usr/lib/python2.7/dist-packages/rosdep2/init.py”, line 90, in create_default_installer_context
m.register_platforms(context)
File “/usr/lib/python2.7/dist-packages/rosdep2/platforms/debian.py”, line 55, in register_platforms
register_elementary(context)
File “/usr/lib/python2.7/dist-packages/rosdep2/platforms/debian.py”, line 82, in register_elementary
(os_name, os_version) = context.get_os_name_and_version()
File “/usr/lib/python2.7/dist-packages/rosdep2/installers.py”, line 115, in get_os_name_and_version
os_name = self.os_detect.get_name()
File “/usr/lib/python2.7/dist-packages/rospkg/os_detect.py”, line 698, in get_name
self.detect_os()
File “/usr/lib/python2.7/dist-packages/rospkg/os_detect.py”, line 668, in detect_os
raise OsNotDetected(“Could not detect OS, tried %s” % attempted)
OsNotDetected: Could not detect OS, tried [‘zorin’, ‘windows’, ‘nixos’, ‘clearlinux’, ‘ubuntu’, ‘slackware’, ‘rhel’, ‘qnx’, ‘pop’, ‘osx’, ‘sailfishos’, ‘tizen’, ‘opensuse’, ‘opensuse’, ‘opensuse’, ‘opensuse’, ‘openembedded’, ‘neon’, ‘mx’, ‘mint’, ‘linaro’, ‘gentoo’, ‘funtoo’, ‘freebsd’, ‘fedora’, ‘elementary’, ‘elementary’, ‘debian’, ‘cygwin’, ‘centos’, ‘manjaro’, ‘arch’, ‘alpine’]

解决方案

修改/etc/lsb-realse中DISTRIB_ID 为debian,如下图:在这里插入图片描述
但是该文件直接打开是没有权限的,所以继续如下操作

修改权限

打开命令行,输入如下代码:
下面展示一些。

sudo su

然后输入密码,定位到该文件(在home/用户名/etc 文件目录下),输入以下命令 ps:也可直接修改后面为文件路径

chmod 777 lsb-release

然后修改名称即可,再次回到命令行输入即可

rosdep update

在这里插入图片描述
然后就可以慢慢等待安装了,后续遇到问题再继续更新

感谢https://blog.csdn.net/xiaoding_ding/article/details/54706046提供思路!

  • 5
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值