【问题标题】:Docker install on Linux Mint 19 Tara [closed]在 Linux Mint 19 Tara 上安装 Docker [关闭]
【发布时间】:2019-03-03 21:32:07
【问题描述】:

我尝试在 Linux 上安装 docker 详情如下 -

    Mint version 19, 
    Code name : Tara,
    PackageBase : Ubuntu Bionic
    Cinnamon (64-bit)

参考链接:https://docs.docker.com/install/linux/docker-ce/ubuntu/

步骤:

1. sudo apt-get remove docker docker-engine docker.io

2. sudo apt-get update

3. sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

4. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

5. sudo apt-key fingerprint 0EBFCD88

6. sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

7. sudo apt-get update

8. sudo apt-get install docker-ce

对于第 6 步,我检查了 lsb_release -cs

xxxxxxxxx:~$ lsb_release -cs
tara

我在第 7 步看到了问题。

xxxxxxxxxxx:~$ sudo apt-get update
Ign:1 http://packages.linuxmint.com tara InRelease
Hit:2 http://packages.linuxmint.com tara Release                                                                                                                        
Hit:3 http://la-mirrors.evowise.com/ubuntu bionic InRelease                                                                                                             
Hit:4 http://la-mirrors.evowise.com/ubuntu bionic-updates InRelease                                                                                                     
Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                            
Hit:7 http://la-mirrors.evowise.com/ubuntu bionic-backports InRelease                                                                                                   
Hit:8 http://archive.canonical.com/ubuntu bionic InRelease                                                                                                              
Get:9 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]                    
Hit:10 http://dl.google.com/linux/chrome/deb stable Release                                                
Ign:11 https://download.docker.com/linux/ubuntu tara InRelease                                             
Err:13 https://download.docker.com/linux/ubuntu tara Release                         
  404  Not Found [IP: 2600:9000:2045:3c00:3:db06:4200:93a1 443]
Reading package lists... Done                      
E: The repository 'https://download.docker.com/linux/ubuntu tara Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

作为第 8 步的效果,我看到以下错误。

xxxxxxxx:~$ sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker-ce' has no installation candidate

Linux mint Tara 或 Ubuntu Bionic 与 Docker 似乎存在一些问题。

谁能告诉我如何解决问题并安装 docker?

【问题讨论】:

  • 我投票结束这个问题,因为它不是关于编程,而是关于 Linux 的使用。我建议在unix.stackexchange.com 上重新提出这个问题。
  • @peterh 并非在 stackoverflow 上提出的每个问题都与编程有关。这个问题中提出的主题是真正的问题,因为我在 docker 手册中没有找到任何关于在 linux 上安装的明确细节。请查看该主题的答案以获得更清晰的信息。
  • @ShivrejJadhav 加入评论聊天here
  • FWIW 我发现 la-mirrors.evowise 非常不一致。改用 math.ucdavis.edu 服务器

标签: linux docker ubuntu linux-mint cinnamon


【解决方案1】:

https://download.docker.com/linux/ubuntu 的 Docker 存储库不知道 Linux Mint 的代号 tara。使用 Ubuntu 的代号,bionic

也就是说,您上面的第 6 步应该是这样的:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"

这是因为 Linux Mint 是在 Ubuntu 之上构建的。在这一步中,我们只是将 Linux Mint 代号(由lsb_release -cs 返回)替换为 Ubuntu 基本代号(由. /etc/os-release; echo "$UBUNTU_CODENAME" 返回)。


因为您已经运行了错误的命令(使用 Linux Mint 代号),您可能会发现您继续看到带有 apt-get update 的警告。要解决这些问题,您可以删除相应的文件(从 /etc/apt/sources.list.d/ 中删除 tara 的文件,或使用其他 GUI 或命令行工具为您执行此操作。

【讨论】:

  • 使用 "$(. /etc/os-release; echo "$UBUNTU_CODENAME")" 而不是 "$(lsb_release -cs)"。我检查过它有效))
  • 好消息!我会将其添加到上面的答案中。
  • 这在 linux mint 19.2 中不起作用。我在这里找到了解决方案:stackoverflow.com/questions/57402923/…
猜你喜欢
  • 2019-03-15
  • 1970-01-01
  • 2019-12-15
  • 2019-08-26
  • 1970-01-01
  • 1970-01-01
  • 2019-06-07
  • 1970-01-01
  • 2017-01-09
相关资源
最近更新 更多