在安装docker时遇到如下错误:
After this operation, 93.0 MB of additional disk space will be used.
Err:1 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 docker-engine amd64 17.05.0~ce-0~ubuntu-xenial 404 Not Found [IP: 116.211.153.234 80]
E: Failed to fetch http://mirrors.aliyun.com/docker-engine/apt/repo/pool/main/d/docker-engine/docker-engine_17.05.0~ce-0~ubuntu-xenial_amd64.deb 404 Not Found [IP: 116.211.153.234 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
错误返回的是Not Found 404,没有找到相应链接的网页.很显然,所以用这种方法走不通.
下面尝试着直接运行
sudo apt install docker.io
完成安装之后,通过
docker version
来检验安装是否成功,若显示如下则成功
Client:
Version: 17.03.2-ce
API version: 1.27
Go version: go1.6.2
Git commit: f5ec1e2
Built: Thu Jul 5 23:07:48 2018
OS/Arch: linux/amd64
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.27/version: dial unix /var/run/docker.sock: connect: permission denied
但是现在还有一个小问题,就是在当前用户运行docker会显示权限不够,即permission denied,所以需要
sudo groupadd docker
sudo gpasswd -a ${USER} docker
然后运行
docker version
就不会出现权限不够的问题啦
网友评论