After following all the instructions in CUDA Toolkit 11.1 Downloads, the last instruction
sudo apt-get -y install cuda doesn't work for me.
Terminal shows this message:
The following packages have unmet dependencies: cuda : Depends: cuda-11-1 (>= 11.1.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages. PS: I have an NVIDIA GTX 1660TI card in my computer.
Any solution please?
35 Answers
I just ran into this issue and solved it by running the following commands:
sudo apt clean sudo apt update sudo apt purge nvidia-* sudo apt autoremove sudo apt install -y cuda Major thanks to this post on the Nvidia forums.
3I think the issue is the CUDA driver version. It looks like the installer tries to install the newest version 455.23.05 and the installation actually fails there.
I've solved it by first downloading the local installer and unselecting the CUDA driver installation, so it just installs the toolkit.
wget chmod +x cuda_11.1.0_455.23.05_linux.run sudo ./cuda_11.1.0_455.23.05_linux.run In the menu unselect the driver installation:
If not already done, add the nvidia repo as per instructions from the official website before installing the driver:
wget sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key adv --fetch-keys sudo add-apt-repository "deb /" sudo apt-get update Install the CUDA driver 450 manually:
sudo apt-get install cuda-drivers-450 Test by running nvcc -V In case nvcc is not found, don't forget to add it to your PATH: PATH=$PATH:/usr/local/cuda/bin
You have to uninstall any nvidia driver before running sudo apt install -y cuda
To do so, got to "Software & Updates" -> "Additional drivers" -> Using X.Org X (nouveou)
As in the previous post, I run this for Ubuntu 20.04 Nvidia Quadro P520:
sudo apt clean sudo apt update sudo apt purge nvidia-* sudo apt autoremove Reboot your PC and run this:
sudo apt install -y cuda 2What helped me in resolving this issue is that I installed up to dated version of the nvidia driver with command "sudo apt install nvidia-driver-NNN" and then pointed on it to be used from the Software & Updates - Additional Drivers