我正在尝试使用以下命令sudo apt install docker.io
在ubuntu 18.04中安装docker。问题是,在完成某些工作之后,它实际上开始安装docker时,出现以下错误:
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker,action "start" failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
active: activating (auto-restart) (Result: exit-code) since Wed 2019-11-06 15:24:39 EST; 4ms ago
Docs: https://docs.docker.com
Process: 6303 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited,status=1/FAILURE)
Main PID: 6303 (code=exited,status=1/FAILURE)
我尝试了systemctl status docker.service
和journalctl -xe
,但是由于我是Linux的新手,所以无法弄清问题
编辑
systemctl status docker.service output:
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
active: failed (Result: exit-code) since Thu 2019-11-07 09:18:38 EST; 6s ago
Docs: https://docs.docker.com
Process: 2819 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited,status=1/FAILURE)
Main PID: 2819 (code=exited,status=1/FAILURE)
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: docker.service: Service hold-off time over,scheduling restart.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: docker.service: Scheduled restart job,restart counter is at 4.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: Stopped Docker Application Container Engine.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: docker.service: Start request repeated too quickly.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: Failed to start Docker Application Container Engine.
和journalctl -xe
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has finished shutting down.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has begun shutting down.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has begun starting up.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is RESULT.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: docker.service: Start request repeated too quickly.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has failed.
--
-- The result is RESULT.
Nov 07 09:18:38 alejandro-ThinkPad-E480 systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
Nov 07 09:19:26 alejandro-ThinkPad-E480 pkexec[2910]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Nov 07 09:19:26 alejandro-ThinkPad-E480 pkexec[2910]: alejandro: Executing command [USER=root] [TTY=unknown] [CWD=/home/alejandro] [COMMAND=/usr/lib/u