第一步出错:
root@bp:/home/bp# apt-get install docker
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package docker
root@bp:/home/bp# sudo apt-get update
Err http://security.ubuntu.com trusty-security InRelease
Err http://security.ubuntu.com trusty-security Release.gpg
Could not resolve 'security.ubuntu.com'
Err http://cn.archive.ubuntu.com trusty InRelease
Err http://cn.archive.ubuntu.com trusty-updates InRelease
Err http://cn.archive.ubuntu.com trusty-backports InRelease
Err http://cn.archive.ubuntu.com trusty Release.gpg
Could not resolve 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com trusty-backports Release.gpg
Could not resolve 'cn.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'cn.archive.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'cn.archive.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg Could not resolve 'cn.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
第二步出错:root@bp:/home/bp# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@bp:/home/bp# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@bp:/home/bp#
第三步出错:root@bp:/home/bp# sudo apt-get install -y docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package docker.io
E: Couldn't find any package by regex 'docker.io'
一般情况这一步都能成功,按网上说的应用以下指令
root@bp:/home/bp# curl -sSL https://get.docker.com/ubuntu/ | sudo sh
还是报错curl: (6) Could not resolve host: get.docker.com
之后root@bp:/home/bp# sudo apt-get update && sudo apt-get upgrade
出现错误0% [Connecting to cn.archive.ubuntu.com] [Connecting to security.ubuntu.com]
Err http://security.ubuntu.com trusty-security InRelease
Err http://security.ubuntu.com trusty-security Release.gpg
Could not resolve 'security.ubuntu.com'
Err http://cn.archive.ubuntu.com trusty InRelease
Err http://cn.archive.ubuntu.com trusty-updates InRelease
Err http://cn.archive.ubuntu.com trusty-backports InRelease
Err http://cn.archive.ubuntu.com trusty Release.gpg
Could not resolve 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com trusty-backports Release.gpg
Could not resolve 'cn.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'cn.archive.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'cn.archive.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg Could not resolve 'cn.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
哪位大圣看看如何解决