-1

我在 Ubuntu16.05 中有 docker 版本 18.09.5。

Client:
 Version:           18.09.5
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        e8ff056
 Built:             Thu May  9 23:18:36 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.5
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       e8ff056
  Built:            Thu May  9 22:53:57 2019
  OS/Arch:          linux/amd64
  Experimental:     false

我需要安装 nvidia-docker2 并且错误是

The following packages have unmet dependencies:
 nvidia-docker2 : Depends: docker-ce (= 5:18.09.7~3-0~ubuntu-xenial) but it is not installable or
                           docker-ee (= 5:18.09.7~3-0~ubuntu-xenial) but it is not installable
E: Unable to correct problems, you have held broken packages.

所以需要升级到18.09.7。

我按照链接进行更新。但看起来,它做得不对。所以我按如下方式中止。

sudo aptitude install lxc-docker
The following NEW packages will be installed:
  aufs-tools{a} lxc-docker lxc-docker-1.9.1{ab} 
0 packages upgraded, 3 newly installed, 0 to remove and 11 not upgraded.
Need to get 8,590 kB of archives. After unpacking 30.6 MB will be used.
The following packages have unmet dependencies:
 lxc-docker-1.9.1 : Conflicts: docker.io but 18.09.5-0ubuntu1~16.04.2 is installed and it is kept back.
The following actions will resolve these dependencies:

     Remove the following packages:
1)     docker.io                   



Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     lxc-docker [Not Installed]                         
2)     lxc-docker-1.9.1 [Not Installed]                   



Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.

那么对于我来说,安装 nvidia-docker2 的正确方法是什么?

我需要升级 docker 还是如何升级?

4

1 回答 1

1

问题解决了。按照这个链接

诀窍是我们可以看到多个存储库使用

apt-cache madison docker-ce

然后选择18.09.7版本安装。

现在 nvidia-docker-2 已安装。

于 2019-07-05T09:22:17.657 回答