全球主机交流论坛

标题: 已解决 请教下ubuntu 的docker安装脚本 [打印本页]

作者: comet    时间: 2023-2-4 22:33
标题: 已解决 请教下ubuntu 的docker安装脚本
本帖最后由 comet 于 2023-2-5 12:18 编辑

甲骨文的几台ubuntu安装docker都出错
不知道还有什么好的办法没


root@ubuntu:~# wget -qO- get.docker.com | bash
# Executing docker install script, commit: 66474034547a96caa0a25be56051ff8b726a1b28
+ sh -c 'apt-get update -qq >/dev/null'
E: 仓库 “https://download.docker.com/linux/debian focal Release” 没有 Release 文件。
E: 仓库 “http://ppa.launchpad.net/morphis/anbox-support/ubuntu focal Release” 没有 Release 文件。
root@ubuntu:~#



作者: 腾讯云6折购    时间: 2023-2-4 22:34
  1. curl -fsSL https://get.docker.com | bash -s docker
  2. curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  3. chmod +x /usr/local/bin/docker-compose
复制代码

作者: hacn    时间: 2023-2-4 22:35
不行就手动装
https://yeasy.gitbook.io/docker_practice/install/ubuntu
作者: tilm    时间: 2023-2-4 22:47
本帖最后由 tilm 于 2023-2-4 22:53 编辑

你的 sources.list 配置错了吧
作者: comet    时间: 2023-2-4 22:56
tilm 发表于 2023-2-4 22:47
你的 sources.list 配置错了吧

我用一件脚本和手动的都装不上
作者: tilm    时间: 2023-2-4 22:56
comet 发表于 2023-2-4 22:56
我用一件脚本和手动的都装不上

你看看 /etc/apt/sources.list 里面是什么东西
作者: comet    时间: 2023-2-4 23:00
本帖最后由 comet 于 2023-2-4 23:02 编辑

# deb http://ports.ubuntu.com/ focal main restricted

# deb http://ports.ubuntu.com/ focal-updates main restricted
# deb http://ports.ubuntu.com/ focal-security main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ports.ubuntu.com/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ focal-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ focal universe

作者: tilm    时间: 2023-2-4 23:01
本帖最后由 tilm 于 2023-2-4 23:04 编辑
comet 发表于 2023-2-4 23:00
# deb http://deb.debian.org/debian bullseye main

deb http://deb.debian.org/debian bullseye main


你是 ubuntu 的,怎么全是 debian 的源

我看你的应该是 ubuntu 20.04 吧,全部换成下面的默认源
  1. deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
  2. deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse

  3. deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
  4. deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse

  5. deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6. deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

  7. deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
  8. deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

  9. deb http://archive.canonical.com/ubuntu focal partner
  10. deb-src http://archive.canonical.com/ubuntu focal partner
复制代码

作者: comet    时间: 2023-2-4 23:03
腾讯云6折购 发表于 2023-2-4 22:34

这个第二步就是我发帖的错误
作者: tilm    时间: 2023-2-4 23:07
comet 发表于 2023-2-4 23:03
这个第二步就是我发帖的错误


你刚刚怎么回复一堆 debina 源,现在又是 ubuntu 源?
作者: comet    时间: 2023-2-4 23:13
腾讯云6折购 发表于 2023-2-4 22:34

用你的这个脚本第二步可以,装上docker-compose了,就是第一步docker出现我发帖的那个错误
作者: comet    时间: 2023-2-4 23:16
tilm 发表于 2023-2-4 23:07
你刚刚怎么回复一堆 debina 源,现在又是 ubuntu 源?

刚才我同时打开另外一台机,复制错了。。
作者: tilm    时间: 2023-2-4 23:24
comet 发表于 2023-2-4 23:16
刚才我同时打开另外一台机,复制错了。。

你把源改成我刚刚发的试试
作者: zp96324511    时间: 2023-2-4 23:57
我一般直接  apt install docker.io
作者: comet    时间: 2023-2-5 00:08
zp96324511 发表于 2023-2-4 23:57
我一般直接  apt install docker.io

谢谢解答!
竟然过去了
作者: tem    时间: 2023-2-5 03:41
Docker官网有一键脚本。。。
作者: comet    时间: 2023-2-5 12:17
tem 发表于 2023-2-5 03:41
Docker官网有一键脚本。。。

甲骨文的ubuntu用那个一键不好使。还是dd过dd萌咖的20.04




欢迎光临 全球主机交流论坛 (https://91ai.net/) Powered by Discuz! X3.4