安装老提示这个 :Command 'docker' not found, but can be installed with:
snap install docker # version 20.10.17, or apt install docker.io # version 20.10.21-0ubuntu1~20.04.1
See 'snap info docker' for additional versions.
root@serimt4vdimm4ap:~# apt install docker.io Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: docker.io : Depends: containerd (>= 1.2.6-0ubuntu1~) Recommends: pigz but it is not going to be installed Recommends: ubuntu-fan but it is not going to be installed php-cli : Depends: php7.4-cli but it is not going to be installed php-zip : Depends: php-common but it is not going to be installed php7.4-common : Depends: php-common (>= 1:73) but it is not going to be installed php7.4-json : Depends: php-common (>= 1:73) but it is not going to be installed php7.4-opcache : Depends: php-common (>= 1:73) but it is not going to be installed php7.4-readline : Depends: php-common (>= 1:73) but it is not going to be installed php7.4-zip : Depends: php-common (>= 1:73) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with
一直导致我安装失败,请问有什么解决办法,通过命令的形式
![]() | 1 dier 2023-04-20 14:19:38 +08:00 |
2 wzry2580 OP 还是装不了,W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1 |
![]() | 3 dier 2023-04-20 14:36:59 +08:00 /etc/apt/sources.list 58 行 跟 /etc/apt/sources.list.d/docker.list 的第一行有重复啊 |
4 /div> exqibao 2023-04-20 16:07:57 +08:00 所有操作前备份; 编辑清理 /etc/apt/sources.list 里,docker 相关行配置; 删除 /etc/apt/sources.list.d/docker.list 文件; 重新执行以下命令,“--mirror Aliyun”使用阿里服务器,国内下载更快,参考 https://docs.docker.com/engine/install/ubuntu/ curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh --mirror Aliyun |
5 haimianbihdata 2023-04-20 16:17:17 +08:00 via Android @exqibao 前天用的就是阿里云的镜像下载 docker 。出问题。包不匹配好像。建议用腾讯云的镜像 |
![]() | 6 ysc3839 2023-04-20 16:27:49 +08:00 via Android 建议重装系统 |
![]() | 7 tony1016 2023-04-20 16:34:04 +08:00 人家都说了,你的依赖有问题了,用 apt --fix-broken install 修复 |
8 maxwell29 2023-04-20 20:44:25 +08:00 我装了三次,实体机,虚拟机,都没问题。docker 和乌班图 |
9 xjqxz2 2023-04-21 10:54:13 +08:00 哈哈 我用了 PODMAN~感觉体验和 DOCKER 一样一样的 |