Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 6540  / 3 Years ago, sat, september 25, 2021, 3:09:00

Ubuntu version: 18.04
Apt version: 1.6.13


I attempted to install a different cuda toolkit, and in doing so may have irrevocably broken apt. I believe the problem has nothing to do with cuda however, and that apt is at fault here.


If I run sudo apt-get install *anything* (or apt remove or apt purge) I get the error:


Reading package lists... Done Building dependency tree Reading state information... Done cuda is already the newest version (11.2.2-1). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies. cuda-drivers-460 : Depends: libnvidia-common-460 (>= 460.32.03) but it is not going to be installed libnvidia-gl-460 : Depends: libnvidia-common-460 but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


so I try sudo apt --fix-broken install:


Get:1 file:/var/cuda-repo-ubuntu1804-11-2-local libnvidia-common-460 460.32.03-0ubuntu1 [10.2 kB] Err:1 file:/var/cuda-repo-ubuntu1804-11-2-local libnvidia-common-460 460.32.03-0ubuntu1 File not found - /var/cuda-repo-ubuntu1804-11-2-local/./libnvidia-common-460_460.32.03-0ubuntu1_all.deb (2: No such file or directory) E: Failed to fetch file:/var/cuda-repo-ubuntu1804-11-2-local/./libnvidia-common-460_460.32.03-0ubuntu1_all.deb File not found - /var/cuda-repo-ubuntu1804-11-2-local/./libnvidia-common-460_460.32.03-0ubuntu1_all.deb (2: No such file or directory) E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


indeed /var/cuda-repo-ubuntu1804-11-2-local does not exist, let alone the files within.


Running sudo apt-get update yields:


E: The repository 'file:/var/cuda-repo-10-1-local-10.1.105-418.39 Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'file:/var/cuda-repo-ubuntu1804-11-2-local Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


which again probably stems from not having /var/cuda-repo-ubuntu1804-11-2-local (or /var/cuda-repo-10-1-local-10.1.105-418.39)


following the advice from https://forums.linuxmint.com/viewtopic.php?t=281922
I have also tried:
sudo su for FILE in $(dpkg-divert --list | grep nvidia-440 | awk '{print $3}'); do dpkg-divert --remove $FILE; done exit


but entering the line beginning for FILE... does nothing (nor does replacing nvidia-440 with 450 or 460)


I am using apt version 1.6.13 which I have tried reinstalling by running sudo dpkg -i apt_1.6.13_amd64.deb (downloaded from http://archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.6.13_amd64.deb
) but I still get the same errors when running anything above


any suggestions would be greatly appreciated - I would really like to avoid having to reinstall ubuntu.


More From » apt

 Answers
7

This is as much a reply to @ubfan1 than anything, but the problem was I was unable to start afresh / remove any lingering cuda on my system. The answer in How do I install NVIDIA and CUDA drivers into Ubuntu?


provided the magic: sudo rm /etc/apt/sources.list.d/cuda*
which then allowed me to run update followed by fix-broken install


[#1704] Saturday, September 25, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
intssive

Total Points: 493
Total Questions: 119
Total Answers: 101

Location: Liberia
Member since Mon, Feb 1, 2021
3 Years ago
;