Score:0

Ubuntu 21.04: CUDA 11.4 installation tries to install driver incompatible with hardware

cn flag

I’m trying to install CUDA 11.4 on my Ubuntu 21.04 machine, which has a Tesla K40m installed.

Because the K40 is so old, it is not supported by the latest nvidia-driver-495. I have driver 470.74 installed, which works well.

I’ve followed the directions to add the Ubuntu 20.04 Nvidia repo and tried

sudo apt install cuda-11-4

This has a dependency on nvidia driver >=470.52.02 so it tries to update to the latest version.

Is there any way to install cuda-11-4 without upgrading nvidia-driver-470 to nvidia-driver-495? Trying

sudo apt-mark hold nvidia-driver-470

to lock the driver version, then sudo apt install cuda-11-4 results in unmet dependencies issues:

$ sudo apt install cuda-11-4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver-470 : Depends: libnvidia-gl-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: nvidia-dkms-470 (<= 470.74-1)
                     Depends: nvidia-dkms-470 (>= 470.74)
                     Depends: nvidia-kernel-common-470 (<= 470.74-1) but it is not installable
                     Depends: nvidia-kernel-common-470 (>= 470.74) but it is not installable
                     Depends: nvidia-kernel-source-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: libnvidia-compute-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: libnvidia-extra-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: nvidia-compute-utils-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: libnvidia-decode-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: libnvidia-encode-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: nvidia-utils-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: xserver-xorg-video-nvidia-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: libnvidia-cfg1-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Depends: libnvidia-ifr1-470 (= 470.74-0ubuntu0.21.04.1) but it is not going to be installed
                     Depends: libnvidia-fbc1-470 (= 470.74-0ubuntu0.21.04.1) but it is not installable
                     Recommends: libnvidia-compute-470:i386 (= 470.74-0ubuntu0.21.04.1)
                     Recommends: libnvidia-decode-470:i386 (= 470.74-0ubuntu0.21.04.1)
                     Recommends: libnvidia-encode-470:i386 (= 470.74-0ubuntu0.21.04.1)
                     Recommends: libnvidia-ifr1-470:i386 (= 470.74-0ubuntu0.21.04.1)
                     Recommends: libnvidia-fbc1-470:i386 (= 470.74-0ubuntu0.21.04.1)
                     Recommends: libnvidia-gl-470:i386 (= 470.74-0ubuntu0.21.04.1)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
cc flag
Take a look at https://askubuntu.com/questions/1077061/how-do-i-install-nvidia-and-cuda-drivers-into-ubuntu Basically, set up a working Nvidia driver, then use the .run file from Nvidia, giving you the option to install without doing the Nvidia driver.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.