Docker在Linux Mint 19 Tara上安装

时间:2018-09-27 22:27:05

标签: linux docker ubuntu linuxmint cinnamon

我试图在Linux上安装docker 详细信息如下-

$body = @{
 "UserSessionId"="12345678"
 "OptionalEmail"="MyEmail@gmail.com"
} | ConvertTo-Json

$header = @{
 "Accept"="application/json"
 "connectapitoken"="97fe6ab5b1a640909551e36a071ce9ed"
 "Content-Type"="application/json"
} 

Invoke-RestMethod -Uri "http://MyServer/WSVistaWebClient/RESTService.svc/member/search" -Method 'Post' -Body $body -Headers $header | ConvertTo-HTML

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

步骤:

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

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

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

我在第7步看到问题。

xxxxxxxxx:~$ lsb_release -cs
tara

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

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.

Linux薄荷Tara或Docker的Ubuntu Bionic似乎有问题。

有人可以告诉我如何解决该问题并安装docker吗?

1 个答案:

答案 0 :(得分:29)

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的警告。要解决这些问题,您可以删除相应的文件(从tara/etc/apt/sources.list.d/的文件,或使用其他GUI或命令行工具为您完成此操作。