小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
rosdepc update常见错误及解决方案
-
这两天有不少小伙伴遇到rosdepc update更新失败问题,主要有两个,这里小鱼介绍下并提供解决方案。
一、使用rosdepc update后出现Expected file type is 'distribution'
这个问题,应该是rosdistro仓库修改了些东西造成的humble版本更新时的bug,可以通过下面的命令指定更新的ros版本解决。
ERROR: Rosdep experienced an error: Expected file type is 'distribution' Please go to the rosdepc page [1] and file a bug report with the stack trace below. [1] : http://www.ros.org/wiki/rosdepc 发生错误了,请关注微信公众号:鱼香ROS,找小鱼反馈哦 rosdepc version: 0.21.0 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 146, in rosdep_main exit_code = _rosdep_main(args) File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 446, in _rosdep_main return _no_args_handler(command, parser, options, args) File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 455, in _no_args_handler return command_handlers[command](options) File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 677, in command_update ros_distro=options.ros_distro) File "/usr/local/lib/python2.7/dist-packages/roscdep2/sources_list.py", line 516, in update_sources_list rosdep_data = get_gbprepo_as_rosdep_data(dist_name) File "/usr/local/lib/python2.7/dist-packages/roscdep2/gbpdistro_support.py", line 149, in get_gbprepo_as_rosdep_data distro_file = get_release_file(gbpdistro) File "/usr/local/lib/python2.7/dist-packages/roscdep2/rosdistrohelper.py", line 77, in get_release_file dist_file = rosdistro.get_distribution_file(get_index(), distro) File "/usr/local/lib/python2.7/dist-packages/rosdistro/__init__.py", line 120, in get_distribution_file return create_distribution_file(dist_name, data) File "/usr/local/lib/python2.7/dist-packages/rosdistro/distribution_file.py", line 134, in create_distribution_file dist_file = DistributionFile(dist_name, d) File "/usr/local/lib/python2.7/dist-packages/rosdistro/distribution_file.py", line 45, in __init__ assert 'type' in data, "Expected file type is '%s'" % DistributionFile._type AssertionError: Expected file type is 'distribution'
解决方案
使用下面的命令代替rosdepc update
rosdepc update --rosdistro=$ROS_DISTRO
如果遇到错误可以将
$ROS_DISTRO
替换为你的ROS版本名称
rosdepc update --rosdistro=你的ROS版本名称
比如
rosdepc update --rosdistro=melodic rosdepc update --rosdistro=kinetic
二、Ubable to process source [xxxx/fuerte.yaml]
这个直接忽略即可,不影响使用。
-
@小鱼 在 rosdepc update常见错误及解决方案 中说:
rosdepc update --rosdistro=$ROS_DISTRO
一键装机里面的 rosdepc update 应该是没有问题,大概是网络的原因,我第一次也没有成功,多来了几次就成功了
-
-
-
-
@小鱼 你好,我希正在制作一个ros的docker镜像,但是在ubuntu容器中只能通过root权限运行指令(可能是镜像太简洁所以没有用户管理系统,只有root),所以运行rosdep update也是在root下面进行的,报错说无法运行,请问有何解决方法么
-
@717341215 支持的,你要安装和init update 都用root权限就行
-
@小鱼 这边提示安装成功了但是我使用rosdepc update显示找不到命令rosdepc -
@490872561 没装成功
-
请问出现图中could not detect OS 算更新有问题吗?
我跑gazebo仿真程序的时候也会报这个错误。 -
@小鱼 您好,能帮忙看一下我这个是什么问题嘛?
-
为什么会这个样子呢? -
@jingjumo sudo rosdepc init
-
ros1@DESKTOP-LAT9F3M:~$ sudo rosdepc init
欢迎使用国内版rosdep之rosdepc,我是作者小鱼!
欢迎关注公众号《鱼香ROS》加入交流群
小鱼rosdepc正式为您服务
--2023-08-14 10:07:28-- https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
正在解析主机 mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
正在连接 mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443... 已连
接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 550 [application/octet-stream]
正在保存至: “/etc/ros/rosdep/sources.list.d/20-default.list”/etc/ros/rosdep/sources 100%[==============================>] 550 --.-KB/s 用时 0s
2023-08-14 10:07:31 (118 MB/s) - 已保存 “/etc/ros/rosdep/sources.list.d/20-default.list” [550/550])
小鱼提示:恭喜你完成初始化,快点使用
rosdepc update
更新吧
因为有一些小伙伴更新使用rosdep update,老是搞错,小鱼就直接帮你进行更新了!请稍等!reading in sources list data from /etc/ros/rosdep/sources.list.d
Warning: running 'rosdep update' as root is not recommended.
You should run 'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo.
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/base.yaml
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/python.yaml
ERROR: unable to process source [https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/ruby.yaml]:
<urlopen error [Errno 101] Network is unreachable> (https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/ruby.yaml)
Query rosdistro index https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Skip end-of-life distro "foxy"
Skip end-of-life distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Add distro "iron"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Skip end-of-life distro "melodic"
Add distro "noetic"
ERROR: error loading sources list:
<urlopen error <urlopen error [Errno 101] Network is unreachable> (https://mirrors.tuna.tsinghua.edu.cn/rosdistro/noetic/distribution.yaml)>小鱼恭喜:rosdepc已为您完成更新!!
如果在上述更新中遇到错误,请查看rosdepc常见错误解决方案:https://fishros.org.cn/forum/topic/676
如果在使用过程中遇到任何问题,欢迎通过fishros.org.cn反馈,最后加入QQ交流群 686914208(入群口令:一键安装)
这样是安装成功了嘛
-
-
ros1@DESKTOP-LAT9F3M:~$ rosdepc update
欢迎使用国内版rosdep之rosdepc,我是作者小鱼!
欢迎关注公众号《鱼香ROS》加入交流群
小鱼rosdepc正式为您服务
reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
<urlopen error [Errno 101] Network is unreachable> (https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/base.yaml
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/python.yaml
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/ruby.yaml
Query rosdistro index https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Skip end-of-life distro "foxy"
Skip end-of-life distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Add distro "iron"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Skip end-of-life distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/ros1/.ros/rosdep/sources.cache
ERROR: Not all sources were able to be updated.
[[[
ERROR: unable to process source [https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
<urlopen error [Errno 101] Network is unreachable> (https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
]]]小鱼恭喜:rosdepc已为您完成更新!!
如果在上述更新中遇到错误,请查看rosdepc常见错误解决方案:https://fishros.org.cn/forum/topic/676
如果在使用过程中遇到任何问题,欢迎通过fishros.org.cn反馈,最后加入QQ交流群 686914208(入群口令:一键安装)
-
-
-
@1530663414你好,请问这个是什么问题,运行rosdepc update 出现
-
请问下这个问题可能是什么原因,全网好像没看到过我这种错误 -
-
@2624602124 你的问题最后解决了吗
-
@497505919 老哥,你的问题解决了吗,我也遇到了这个问题
-
大佬你好,我在使用resdepc update中报错如下:
kip end-of-life distro "groovy"
Add distro "humble"ERROR: Rosdep experienced an error: Could not detect OS, tried ['zorin', 'windows', 'nixos', 'clearlinux', 'ubuntu', 'slackware', 'rocky', 'rhel', 'raspbian', 'qnx', 'pop', 'osx', 'sailfishos', 'tizen', 'conda', 'oracle', 'opensuse', 'opensuse', 'opensuse', 'opensuse', 'opensuse', 'openembedded', 'neon', 'mx', 'mint', 'linaro', 'gentoo', 'funtoo', 'freebsd', 'fedora-asahi', 'fedora', 'elementary', 'elementary', 'debian', 'cygwin', 'euleros', 'centos', 'manjaro', 'buildroot', 'arch', 'amazon', 'alpine', 'almalinux']
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdeprosdep version: 0.23.1
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 146, in rosdep_main
exit_code = _rosdep_main(args)
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 450, in _rosdep_main
return _no_args_handler(command, parser, options, args)
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 459, in _no_args_handler
return command_handlerscommand
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 676, in command_update
quiet=options.quiet)
File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 517, 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 148, in get_gbprepo_as_rosdep_data
ctx = create_default_installer_context()
File "/usr/lib/python2.7/dist-packages/rosdep2/init.py", line 91, in create_default_installer_context
m.register_platforms(context)
File "/usr/lib/python2.7/dist-packages/rosdep2/platforms/arch.py", line 53, in register_platforms
register_manjaro(context)
File "/usr/lib/python2.7/dist-packages/rosdep2/platforms/arch.py", line 58, in register_manjaro
(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 638, in get_name
self.detect_os()
File "/usr/lib/python2.7/dist-packages/rospkg/os_detect.py", line 608, in detect_os
raise OsNotDetected("Could not detect OS, tried %s" % attempted)
OsNotDetected: Could not detect OS, tried ['zorin', 'windows', 'nixos', 'clearlinux', 'ubuntu', 'slackware', 'rocky', 'rhel', 'raspbian', 'qnx', 'pop', 'osx', 'sailfishos', 'tizen', 'conda', 'oracle', 'opensuse', 'opensuse', 'opensuse', 'opensuse', 'opensuse', 'openembedded', 'neon', 'mx', 'mint', 'linaro', 'gentoo', 'funtoo', 'freebsd', 'fedora-asahi', 'fedora', 'elementary', 'elementary', 'debian', 'cygwin', 'euleros', 'centos', 'manjaro', 'buildroot', 'arch', 'amazon', 'alpine', 'almalinux']目前已经尝试了换源、本地编译等方法,但是都不能解决,并且尝试了rosdepc update --rosdistro=melodic仍然不能正常运行,我是ubuntu 1804的,应该是指令没有问题的
-
@2269810364 请问大佬有什么解决方法没有
-
大佬怎么解决这个问题啊@小鱼