3

Background

I want to build (not run) a program using CUDA 11.3, on an Ubuntu 20.04 machine (a Travis CI machine actually). To do this, I want to install, among other things, the cuda-runtime-11-3 package (which becomes available when you add an NVIDIA apt repository).

Now, this works for me with CUDA 11.4:

CUDA_APT="11.4"
sudo apt install -y cuda-runtime-${CUDA_APT} cuda-toolkit-${CUDA_APT} cuda-compiler-${CUDA_APT};

but with 11.3, I get:

The following packages have unmet dependencies:

 cuda-runtime-11-3 : Depends: cuda-drivers (>= 465.19.01) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

Actual question

Can I force an installation of the package despite the dependencies not being installed?

Alternatively, if there's another solution to this conundrum, that would be a good answer too.

einpoklum
  • 8,772
  • 19
  • 65
  • 129
  • Force installing without the dependencies is likely to provide broken software. What is the output of `apt-cache policy cuda-drivers`? Do you already have a newer version of `cuda-drivers` installed and a policy that does not allow downgrades? – GracefulRestart Jul 09 '21 at 18:20
  • @GracefulRestart: 1. In general,, that's true. In this case, I don't need to run the software, just build it, so its brokenness is irrelevant. 2. I'll check, but I think no cuda-drivers is installed. – einpoklum Jul 09 '21 at 18:23
  • @GracefulRestart: So, [here](https://travis-ci.com/github/eyalroz/cuda-api-wrappers/jobs/523317385) you'll find the output of `apt-cache policy cuda-drivers`. – einpoklum Jul 09 '21 at 19:35
  • The output in the link shows that the package is available and you do not have another version installed. I also notice your additional output has a different error then your question. Do you get different errors if you attempt `apt install cuda-drivers` or `apt install cuda-drivers=470.42.01-1` without trying to install other packages? – GracefulRestart Jul 09 '21 at 20:22
  • @GracefulRestart: The output I linked to has a different command-line: I added `cuda-drivers=470.42.01-1` to the list. However... I won't be able to answer your questions, since apparently I maxed out my "build credits" or something. So, it seems my question becomes moot :-( – einpoklum Jul 09 '21 at 20:43
  • 1
    I reiterate the importance of the question. I am stuck at the same position with cuda-11-4: "The following packages have unmet dependencies: cuda : Depends: cuda-11-4 (>= 11.4.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages." Perhaps it is a rogue warning. No actual packages are implicated in a mismatch. The package that is not going to be installed has already been installed. No way forward here, either. – Peter Leopold Sep 30 '21 at 04:48

0 Answers0