当我运行以下命令时:
sudo apt-get install -y nvidia-docker2
我收到以下错误响应:
The following packages have unmet dependencies:
nvidia-docker2 : Depends: docker-ce (= 18.06.1~ce~3-0~ubuntu) but it is not installable or
docker-ee (= 18.06.1~ee~3-0~ubuntu) but it is not installable
E: Unable to correct problems, you have held broken packages.
答案 0 :(得分:0)
在/etc/apt/sources.list
中,确保最后一个单词稳定,而不是边缘
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
就我而言,/etc/apt/sources.list
中缺少上述行。我将其添加到底部并执行以下命令:
那么通常:
sudo apt-get update
sudo apt-get install -y docker-ce
使用以下命令验证您的Docker版本:
sudo docker version