小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
安装上位机agent有问题,没有docker的指令
-
输入:sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO serial --dev /dev/ttyUSB0 -v6
sudo: docker: command not found
结果:以下是安装agent的过程
cyh@cyh-OMEN-by-HP-Gaming-Laptop-16-wf0xxx:~$ wget http://fishros.com/install -O fishros && . fishros
--2024-07-24 14:11:32-- http://fishros.com/install
Resolving fishros.com (fishros.com)... 47.119.165.169
Connecting to fishros.com (fishros.com)|47.119.165.169|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://fishros.com/install/ [following]
--2024-07-24 14:11:32-- http://fishros.com/install/
Reusing existing connection to fishros.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 579 [application/octet-stream]
Saving to: ‘fishros’fishros 100%[===================>] 579 --.-KB/s in 0s
2024-07-24 14:11:32 (80.6 MB/s) - ‘fishros’ saved [579/579]
[sudo] password for cyh:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-distro is already the newest version (1.7.0-1).
python3-yaml is already the newest version (5.4.1-1ubuntu1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
docker-desktop : Depends: qemu-system-x86 (>= 5.2.0) but it is not going to be installed
Depends: docker-ce-cli but it is not installable
Depends: pass but it is not going to be installed
Depends: uidmap
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
--2024-07-24 14:11:36-- http://mirror.fishros.com/install/tools/base.py
Resolving mirror.fishros.com (mirror.fishros.com)... 47.119.165.169
Connecting to mirror.fishros.com (mirror.fishros.com)|47.119.165.169|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44650 (44K) [application/octet-stream]
Saving to: ‘/tmp/fishinstall/tools/base.py’/tmp/fishinstall/to 100%[===================>] 43.60K --.-KB/s in 0.04s
2024-07-24 14:11:36 (1.04 MB/s) - ‘/tmp/fishinstall/tools/base.py’ saved [44650/44650]
Run CMD Task:[dpkg --print-architecture]
[-]Result:successRun CMD Task:[wget https://fishros.org.cn/forum/topic/1733 -O /tmp/t1733 -q && rm -rf /tmp/t1733]
[-]Result:success基础检查通过...
======欢迎使用一键安装工具,人生苦短,三省吾身,省时省力省心!=======
======一键安装已开源,请放心使用:https://github.com/fishros/install =======.-~~~~~~~~~-._ _.-~~~~~~~~~-. __.' ~. .~ `.__ .'// 开卷有益 \./ 书山有路 \ `. .'// 可以多看看小鱼的文章 | 关注公众号鱼香ROS \ `. .'// .-~~~~~~~~~~~~~~-._ | _,-~~~~~~~~~~~. \`. .'//.-" `-. | .-' "-.\`. .'//______.============-.. \ | / ..-============.______\`. .'______________________________\|/______________________________` ----------------------------------------------------------------------
RUN Choose Task:[请输入括号内的数字]
---众多工具,等君来用---
ROS相关:
[1]:一键安装(推荐):ROS(支持ROS/ROS2,树莓派Jetson)
[3]:一键安装:rosdep(小鱼的rosdepc,又快又好用)
[4]:一键配置:ROS环境(快速更新ROS环境设置,自动生成环境选择)
[9]:一键安装:Cartographer(18 20测试通过,16未测. updateTime 20240125)
[11]:一键安装:ROS Docker版(支持所有版本ROS/ROS2)
[16]:一键安装:系统自带ROS (!!警告!!仅供特殊情况下使用)常用软件:
[2]:一键安装:github桌面版(小鱼常用的github客户端)
[6]:一键安装:NodeJS环境
[7]:一键安装:VsCode开发工具
[8]:一键安装:Docker
[10]:一键安装:微信(可以在Linux上使用的微信)
[12]:一键安装:PlateformIO MicroROS开发环境(支持Fishbot)
[14]:一键安装:科学上网代理工具
[15]:一键安装:QQ for Linux配置工具:
[5]:一键配置:系统源(更换系统源,支持全版本Ubuntu系统)
[13]:一键配置:python国内源
[17]:一键配置: Docker代理(支持VPN+代理服务两种模式)请输入[]内的数字以选择:8
--2024-07-24 14:11:44-- http://mirror.fishros.com/install/tools/tool_install_docker.py
Resolving mirror.fishros.com (mirror.fishros.com)... 47.119.165.169
Connecting to mirror.fishros.com (mirror.fishros.com)|47.119.165.169|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2882 (2.8K) [application/octet-stream]
Saving to: ‘/tmp/fishinstall/tools/tool_install_docker.py’/tmp/fishinstall/to 100%[===================>] 2.81K --.-KB/s in 0s
2024-07-24 14:11:44 (242 MB/s) - ‘/tmp/fishinstall/tools/tool_install_docker.py’ saved [2882/2882]
欢迎使用一键安装Docker,支持amd64和arm64架构系统,本工具由作者alyssa提供
开始根据系统架构,为你下载对应版本的docker~
Run CMD Task:[sudo apt update]
[/]Get:8 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,08[|]Get:10 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [[/]Get:12 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [[]Get:13 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [|]Get:14 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [5[-]Get:15 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [/]Get:16 http://cn.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Pac[]Get:17 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [[|]Get:18 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packag[-]Get:19 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Package[/]Get:20 http://cn.archive.ubuntu.com/ubuntu jammy-updates/restricted Translati[]Get:21 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packag[|]Get:22 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packa[-]Result:success t --upgradable' to see them.Run CMD Task:[sudo apt install apt-transport-https ca-certificates curl software-properties-common -y]
[|] docker-desktop : Depends: qemu-system-x86 (>= 5.2.0) but it is not going to [-]Result:code:100 not going to be installedRun CMD Task:[curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -]
[-]Result:successRun CMD Task:[sudo apt-key fingerprint 0EBFCD88]
[-]Result:success CE deb) docker@docker.comRun CMD Task:[sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable" -y]
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 363, in <module>
addaptrepo = AddAptRepository()
File "/usr/bin/add-apt-repository", line 41, in init
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 91, in get_sources
raise NoDistroTemplateException(
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Atzlinux/bookworm
下载完成,接下来升级apt索引~
Run CMD Task:[sudo apt update]
[-]Result:success t --upgradable' to see them.开始安装最新版本docker CE~
Run CMD Task:[sudo apt --fix-broken install -y]
[]The following packages were automatically installed and are no longer require[|]Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other[-]Result:success s (0.26-1ubuntu3) ...Run CMD Task:[sudo apt search docker-ce ]
[-]Result:successTraceback (most recent call last):
File "/tmp/fishinstall/install.py", line 124, in <module>
main()
File "/tmp/fishinstall/install.py", line 116, in main
run_tool_file(tools[code]['tool'].replace(url_prefix,'').replace("/","."))
File "/tmp/fishinstall/tools/base.py", line 1297, in run_tool_file
if tool.run()==False: return False
File "/tmp/fishinstall/tools/tool_install_docker.py", line 64, in run
self.install_docker()
File "/tmp/fishinstall/tools/tool_install_docker.py", line 55, in install_docker
AptUtils.install_pkg_check_dep("docker-ce")
File "/tmp/fishinstall/tools/base.py", line 1247, in install_pkg_check_dep
result = AptUtils.install_pkg(name)
File "/tmp/fishinstall/tools/base.py", line 1236, in install_pkg
for key in dic.keys():
AttributeError: 'NoneType' object has no attribute 'keys'
cyh@cyh-OMEN-by-HP-Gaming-Laptop-16-wf0xxx:~$ sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO serial --dev /dev/ttyUSB0 -v6
sudo: docker: command not found -
错误提示
sudo: docker: command not found
表明 Docker 没有安装在您的系统上,或者 Docker 命令没有正确地添加到您的 PATH 环境变量中。根据您提供的安装过程,您已经尝试使用了一个一键安装脚本,但是出现了几个问题:
-
docker-desktop
依赖问题:这通常是为桌面环境设计的 Docker 版本,可能并不适用于您正在使用的服务器或开发环境。您可能想要安装 Docker Engine - Community 版本。 -
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Atzlinux/bookworm
:这表明安装脚本试图为一个不存在的 Linux 发行版(Atzlinux)配置 Docker 仓库,这可能是由于您的系统环境变量或系统信息被错误地识别了。
为了解决这个问题,您可以按照以下步骤操作:
-
移除任何已损坏的 Docker 安装和配置:
sudo apt-get remove docker docker-engine docker.io containerd runc sudo rm -rf /var/lib/docker sudo rm -rf /var/lib/containerd
-
安装 Docker Engine - Community:
# 更新软件包列表 sudo apt update # 安装必要的软件包以允许apt通过HTTPS使用存储库 sudo apt install apt-transport-https ca-certificates curl software-properties-common # 添加Docker的官方GPG密钥 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - # 添加Docker存储库 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # 再次更新软件包列表 sudo apt update # 安装Docker CE sudo apt install docker-ce docker-ce-cli containerd.io
-
启动 Docker 服务并验证安装:
sudo systemctl start docker sudo systemctl status docker # 运行 hello-world 容器来验证 Docker 是否正常工作 sudo docker run hello-world
-
现在您应该能够运行您之前的命令而不会出现
sudo: docker: command not found
的错误。sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO serial --dev /dev/ttyUSB0 -v6
请注意,您需要将
$ROS_DISTRO
替换为您实际使用的 ROS 发行版名称(如galactic
、humble
等)。
如果问题仍然存在,请确保
$ROS_DISTRO
环境变量已被正确设置,或者您可以直接在命令中指定 ROS 发行版名称。
以上为生成回答,仅供参考~
-
-