V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wzry2580
V2EX  ›  Ubuntu

关于有优班图安装 docker 失败

  •  
  •   wzry2580 · 2023-04-20 13:32:27 +08:00 · 2253 次点击
    这是一个创建于 581 天前的主题,其中的信息可能已经有所发展或是发生改变。

    安装老提示这个 :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

    一直导致我安装失败,请问有什么解决办法,通过命令的形式

    9 条回复    2023-04-21 10:54:13 +08:00
    dier
        1
    dier  
       2023-04-20 14:19:38 +08:00
    现在安装的社区版名称叫 docker-ce 。

    参考官方文档来安装吧 https://docs.docker.com/engine/install/ubuntu/
    wzry2580
        2
    wzry2580  
    OP
       2023-04-20 14:28:07 +08:00
    还是装不了,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
    dier
        3
    dier  
       2023-04-20 14:36:59 +08:00
    /etc/apt/sources.list 58 行 跟 /etc/apt/sources.list.d/docker.list 的第一行有重复啊
    exqibao
        4
    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
    haimianbihdata
        5
    haimianbihdata  
       2023-04-20 16:17:17 +08:00 via Android
    @exqibao 前天用的就是阿里云的镜像下载 docker 。出问题。包不匹配好像。建议用腾讯云的镜像
    ysc3839
        6
    ysc3839  
       2023-04-20 16:27:49 +08:00 via Android
    建议重装系统
    tony1016
        7
    tony1016  
       2023-04-20 16:34:04 +08:00
    人家都说了,你的依赖有问题了,用 apt --fix-broken install 修复
    maxwell29
        8
    maxwell29  
       2023-04-20 20:44:25 +08:00
    我装了三次,实体机,虚拟机,都没问题。docker 和乌班图
    xjqxz2
        9
    xjqxz2  
       2023-04-21 10:54:13 +08:00
    哈哈 我用了 PODMAN~感觉体验和 DOCKER 一样一样的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3269 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 12:11 · PVG 20:11 · LAX 04:11 · JFK 07:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.