DPKG:Docker-CE:依赖性问题,但无论如何都会删除:Nvidia-Docker



我通过本网站的指令在Ubuntu 16.04上安装了Docker(https://www.digitalocean.com/community/community/tutorials/how-to-to-in-to-in-to-install-and-com-install-and-us--use-docker--16-04(。运行以下命令以安装docker-engine:

 sudo apt-get install -y docker-engine

有错误的错误,希望你们给我提示解决它。谢谢!

Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  docker-ce
The following NEW packages will be installed:
  docker-engine
0 upgraded, 1 newly installed, 1 to remove and 2 not upgraded.
2 not fully installed or removed.
Need to get 0 B/18.0 MB of archives.
After this operation, 4,214 kB disk space will be freed.
dpkg: docker-ce: dependency problems, but removing anyway as you requested:
 nvidia-docker depends on docker-engine (>= 1.9.0) | docker-ce | docker-ee; however:
  Package docker-engine is not installed.
  Package docker-ce is to be removed.
  Package docker-ee is not installed.
(Reading database ... 189089 files and directories currently installed.)
Removing docker-ce (17.03.1~ce-0~ubuntu-xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Selecting previously unselected package docker-engine.
(Reading database ... 188887 files and directories currently installed.)
Preparing to unpack .../docker-engine_17.04.0~ce-0~ubuntu-xenial_amd64.deb ...
Unpacking docker-engine (17.04.0~ce-0~ubuntu-xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up docker-engine (17.04.0~ce-0~ubuntu-xenial) ...
Installing new version of config file /etc/init.d/docker ...
Job for docker.service failed because the control process exited with error code. See "sys                                                                                                   temctl 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; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2017-04-17 18:44:56 JST                                                                                                   ; 3ms ago
     Docs: https://docs.docker.com
  Process: 15368 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 15368 (code=exited, status=1/FAILURE)
Apr 17 18:44:56 NVIDIA2.cs179idcfcloud.internal systemd[1]: docker.service: Main proces...
Apr 17 18:44:56 NVIDIA2.cs179idcfcloud.internal systemd[1]: Failed to start Docker Appl...
Apr 17 18:44:56 NVIDIA2.cs179idcfcloud.internal systemd[1]: docker.service: Unit entere...
Apr 17 18:44:56 NVIDIA2.cs179idcfcloud.internal systemd[1]: docker.service: Failed with...
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package docker-engine (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nvidia-docker:
 nvidia-docker depends on docker-engine (>= 1.9.0) | docker-ce | docker-ee; however:
  Package docker-engine is not configured yet.
  Package docker-ce is not installed.
  Package docker-ee is not installed.
dpkg: error processing package nvidia-docker (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 docker-engine
 nvidia-docker
E: Sub-process /usr/bin/dpkg returned an error code (1)
challenge98@NVIDIA2:~$ sudo systemctl status docker
challenge98@NVIDIA2:~$ sudo apt-get install -y docker-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
docker-engine is already the newest version (17.04.0~ce-0~ubuntu-xenial).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up docker-engine (17.04.0~ce-0~ubuntu-xenial) ...
Job for docker.service failed because the control process exited with error code. See "sys                                                                                                   temctl 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; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2017-04-17 18:45:49 JST                                                                                                   ; 4ms ago
     Docs: https://docs.docker.com
  Process: 15521 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 15521 (code=exited, status=1/FAILURE)
Apr 17 18:45:49 NVIDIA2.cs179idcfcloud.internal systemd[1]: docker.service: Main proces...
Apr 17 18:45:49 NVIDIA2.cs179idcfcloud.internal systemd[1]: Failed to start Docker Appl...
Apr 17 18:45:49 NVIDIA2.cs179idcfcloud.internal systemd[1]: docker.service: Unit entere...
Apr 17 18:45:49 NVIDIA2.cs179idcfcloud.internal systemd[1]: docker.service: Failed with...
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package docker-engine (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nvidia-docker:
 nvidia-docker depends on docker-engine (>= 1.9.0) | docker-ce | docker-ee; however:
  Package docker-engine is not configured yet.
  Package docker-ce is not installed.
  Package docker-ee is not installed.
dpkg: error processing package nvidia-docker (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 docker-engine
 nvidia-docker
E: Sub-process /usr/bin/dpkg returned an error code (1)

我已经解决了它。首先,使用Linux命令

重新启动Ubuntu服务器
sudo shutdown -r now

然后运行命令:

apt-get -f install

(此命令由错误信息提出(,然后通过以下网站安装Docker-engine(https://www.digitalocean.com/community/tutorials/tutorials/how-to-now-to-now-to-install-andstall-and-and-use------docker-on-ubuntu-16-04(。

您还可以下载三个软件包并安装它们,而不必向Ubuntu添加新的重置。导航到Linux版本:https://download.docker.com/linux/ubuntu/dists/

在大多数情况下转到"池/稳定/",AMD64。

下载三个软件包..容器,Docker CLI和主包(如果选择最新的话,则在底部(。安装所有这些(Xenial示例(:

sudo dpkg -i docker-ce-cli_19.03.5_3-0_ubuntu-xenial_amd64.deb docker-ce_19.03.5_3-0_ubuntu-xenial_amd64.deb containerd.io_1.2.6-3_amd64.deb

最新更新