关于有优班图安装 docker 失败 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wzry2580
V2EX    Ubuntu

关于有优班图安装 docker 失败

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

    安装老提示这个 :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
    /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
    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     Solana     3683 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 26ms UTC 10:21 PVG 18:21 LAX 03:21 JFK 06:21
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86