CUDA 11.7 failing to install on Debian sid

I’m trying to install CUDA 11.7 (the latest) on Debian sid using the NVIDIA-recommended method, but am running into the following errors:

$ uname -a
Linux foo 5.17.0-1-amd64 #1 SMP PREEMPT Debian 5.17.3-1 (2022-04-18) x86_64 GNU/Linux
$ sudo apt install cuda
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:
 xserver-xorg-video-nvidia : Depends: xorg-video-abi-24 but it is not installable or
                                      xorg-video-abi-23 but it is not installable or
                                      xorg-video-abi-20 but it is not installable or
                                      xorg-video-abi-19 but it is not installable or
                                      xorg-video-abi-18 but it is not installable or
                                      xorg-video-abi-15 but it is not installable or
                                      xorg-video-abi-14 but it is not installable or
                                      xorg-video-abi-13 but it is not installable or
                                      xorg-video-abi-12 but it is not installable or
                                      xorg-video-abi-11 but it is not installable or
                                      xorg-video-abi-10 but it is not installable or
                                      xorg-video-abi-8 but it is not installable or
                                      xorg-video-abi-6.0 but it is not installable
                             Depends: xserver-xorg-core (< 2:1.20.99) but 2:21.1.3-2+b1 is to be installed
E: Unable to correct problems, you have held broken packages.

I believe that the older xorg / xserver packages are no longer eligible installation candidates because apt installed a new package xcvt the last time I did sudo apt dist-upgrade . Aside from that, there are no weird broken dependencies on my system; everything is up-to-date.

What is the best way to get CUDA installed at this point? Is there a way to get it installed without downgrading a bunch of packages? (Installing xcvt also resulted in a lot of x* packages being upgraded, so I’m not even sure of everything I’d have to revert or what else that might break.)

Does something need to be fixed with the NVIDIA packages so they are compatible with xcvt and/or the latest xserver-xorg-core version?

Thanks in advance for any help!

Thanks for reporting this - I will ask the installer team to look at this.
In the mean while you could try to do local install of CUDA by downloading a local installer from :
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Debian&target_version=11&target_type=runfile_local

There are two “local” install options a large .deb and a .run option.
These should by pass any dependancies.

Let me know if that works - thanks and good luck.

Thanks @nadeemm ! What I posted above was the result of using the local .deb installation method.

I tried the local .run file, and that seemed to work! However, a small note/bug for the Installer team: when you previously had installed CUDA via the .deb file, and then try to install a newer version via the .run file, the installer silently fails (the error log is not helpful – it just shows the driver failed to install, without explanation, because the driver is installed with a bunch of flags that suppress any output). I downloaded and installed the driver separately, and saw that the error was saying that I had to uninstall all the .deb stuff before installing with the .run file. The installer experience for the .run file should be improved to surface that error message directly, without having to separately download and experiment with the driver installer file. Nonetheless, after removing the cuda deb repo files from /etc/apt/sources.list.d/ and doing sudo apt-get purge nvidia-*, I was able to install from the .run file, and things seem to be working now. Thanks!

1 Like

Dear @sc2pa , could you please elaborate your solution a bit more? I faced exactly the same issue, however purging nvidia-* packages doesn’t help with installation from .run file! It still gets failed!

What is the specific error you are facing?

The commands you are running and the full output are useful in debugging.

I didn’t do anything special besides removing all traces of NVIDIA stuff and then running the .run file…