Score:0

Check package compatibility with apt/aptitude

vc flag

I'm trying to install cuda and nvidia drivers in one go. I ran into a few dependency issues, that were in the end solvable by manually trying to install all the different nvidia driver versions. My question is: Is there a way to check for package compatibility without running apt install?

In my situation I ran

$ sudo apt install nvidia-cuda-toolkit nvidia-driver-515                                                   
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-cuda-toolkit is already the newest version (11.5.1-1ubuntu1).
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.
 libnvidia-decode-515 : Depends: libnvidia-compute-515 (= 515.76+really.515.65.01-0ubuntu0.22.04.2) but it is not installable
 nvidia-compute-utils-515 : Depends: libnvidia-compute-515 but it is not installable
 nvidia-driver-515 : Depends: libnvidia-compute-515 (= 515.76+really.515.65.01-0ubuntu0.22.04.2) but it is not installable
                     Recommends: libnvidia-compute-515:i386 (= 515.76+really.515.65.01-0ubuntu0.22.04.2) but it is not installable
                     Recommends: libnvidia-decode-515:i386 (= 515.76+really.515.65.01-0ubuntu0.22.04.2) but it is not installable
                     Recommends: libnvidia-encode-515:i386 (= 515.76+really.515.65.01-0ubuntu0.22.04.2) but it is not installable
                     Recommends: libnvidia-fbc1-515:i386 (= 515.76+really.515.65.01-0ubuntu0.22.04.2) but it is not installable
                     Recommends: libnvidia-gl-515:i386 (= 515.76+really.515.65.01-0ubuntu0.22.04.2) but it is not installable
 nvidia-utils-515 : Depends: libnvidia-compute-515 but it is not installable
E: Unable to correct problems, you have held broken packages.

To solve it I manually tried different versions of nvidia-driver-xxx. However next time I run into this situation I would like to run a command like sudo apt find-compatable nvidia-cuda-toolkit nvidia-driver-*. Is there any way to do this?

Thanks

Organic Marble avatar
us flag
You can simulate the process by adding the `-s` flag to the `apt install` command. It will run all the dependency checks but not actually do anything. Posting as comment because it still requires running `apt install`.
I sit in a Tesla and translated this thread with Ai:

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.