I have a fresh install of Ubuntu 22.04, the first thing I was trying to do was get CUDA working. I had swapped over to “NVIDIA driver metapackage from nvidia-driver-510” using the Additional Drivers tab of Software & Updates.
I was able to confirm the driver was working and saw the expected output after a “nvidia-smi” call
I was using this guide to install cuda, trying my best to follow the Ubuntu instructions.
The order of commands was:
sudo apt install gcc
sudo apt-get install linux-headers-$(uname -r)
sudo apt-key del 7fa2af80
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get install cuda
EDIT: I just saw the wget command has “ubuntu2004” when I’m using 2204. Maybe this is the source of the issue, but I have no idea how to recover the current situation still.
Everything was successful until the last cuda install command, which has the output:
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 resolve the situation:
The following packages have unmet dependencies:
nvidia-kernel-common-510 : Conflicts: nvidia-kernel-common
nvidia-kernel-common-515 : Conflicts: nvidia-kernel-common
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Seeing this, I tried to roll back to an earlier driver. Using the “additional drivers” tab again I attempted to swap to “nvidia-driver-470”.
After a restart it told me that failed, unfortunately I don’t have that error anymore, but commands to “nvidia-smi” fail now, and my “additional drivers” tab looks like this:
I have tried to revert the drivers back to a known state with sudo ubuntu-drivers autoinstall
but get identical output as when I tried the cuda install.
Any ideas on how to proceed?