【发布时间】:2018-04-05 04:56:11
【问题描述】:
我一直在尝试在 Ubuntu 14.04 的 Linode 实例上安装 docker。我到达最后一步并收到消息: E: 找不到包 docker-ce
我在许多不同的网站上都遵循了这组步骤,但没有运气:
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce
这是我在运行 apt-get update 时看到的:
Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://us.archive.ubuntu.com trusty-security InRelease
Hit http://us.archive.ubuntu.com trusty-updates InRelease
Hit http://us.archive.ubuntu.com trusty-backports InRelease
Hit http://us.archive.ubuntu.com trusty Release.gpg
Hit http://us.archive.ubuntu.com trusty-security/main Sources
Hit http://us.archive.ubuntu.com trusty-security/restricted Sources
Hit http://us.archive.ubuntu.com trusty-security/universe Sources
Hit http://us.archive.ubuntu.com trusty-security/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-security/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-security/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-security/universe i386 Packages
Hit https://download.docker.com trusty InRelease
Hit http://us.archive.ubuntu.com trusty-security/multiverse i386 Packages
Hit https://download.docker.com trusty/stable amd64 Packages
Hit http://us.archive.ubuntu.com trusty-security/main Translation-en
Hit http://us.archive.ubuntu.com trusty-security/multiverse Translation-en
Get:1 https://download.docker.com trusty/stable Translation-en_US
Hit http://us.archive.ubuntu.com trusty-security/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-security/universe Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/main Sources
Hit http://us.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://us.archive.ubuntu.com trusty-updates/universe Sources
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/universe Translation-en
Ign https://download.docker.com trusty/stable Translation-en_US
Hit http://us.archive.ubuntu.com trusty-backports/main Sources
Hit http://us.archive.ubuntu.com trusty-backports/restricted Sources
Ign https://download.docker.com trusty/stable Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Sources
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://us.archive.ubuntu.com trusty Release
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Hit http://us.archive.ubuntu.com trusty/main i386 Packages
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty/main Translation-en
Hit http://us.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty/universe Translation-en
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
此外,/etc/apt/sources.list 包含以下内容:
###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
对可能出现的问题有什么建议吗?我在一个新的 Ubuntu 16.04 实例上运行了相同的命令集,并且 Docker 安装得很好。这个 14.04 实例有很多事情要做,所以我不打算从一个新的开始。
【问题讨论】:
-
你解决过这个问题吗?在遵循您经历的相同 apt-get 序列后,我遇到了完全相同的问题。
-
不,我最终在 Ubuntu 16.04 上启动了一个全新的实例。这不太理想,因为我不想再有另一个实例,但这是我能找到的唯一方法。
-
感谢@jwoww 回复我。原来我的问题是 add-apt-repository 命令中的表达式“$(lsb_release -cs)”。它返回“rosa”,因为我使用的是 Linux Mint。由于我的 mint 版本的基础是 Ubuntu “trusty”,我所要做的就是将 “$(lsb_release -cs)” 替换为 “trusty”,然后瞧。问题。解决了。很高兴您也找到了解决方案!
-
在 Ubuntu 14.04 虚拟机上出现同样的问题。