-1

After following all the instructions in CUDA Toolkit 11.7 Downloads, the last instruction

sudo apt-get -y install cuda

doesn't work for me.

Terminal shows this message:

dmitriy@dmitriy:~/git/drake$ sudo apt-get -y install cuda
Reading package lists... Done
Building dependency tree       
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: cuda : Depends: cuda-11-7 (>= 11.7.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

PS: I have an NVIDIA Geforce 920MX card in my computer.

I try this: How do I resolve unmet dependencies after adding a PPA? (14 answers)

And I got this after this command sudo apt-get -u dist-upgrade, but I have the same error:

dmitriy@dmitriy:/var$ sudo apt-get -u dist-upgrade
Reading package lists... Done
                   ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-41-generic
Found initrd image: /boot/initrd.img-5.15.0-41-generic
Found linux image: /boot/vmlinuz-5.13.0-52-generic
Found initrd image: /boot/initrd.img-5.13.0-52-generic
Found linux image: /boot/vmlinuz-5.13.0-51-generic
Found initrd image: /boot/initrd.img-5.13.0-51-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 on /dev/sda1
done

output of sudo apt update:

dmitriy@dmitriy:/var$ sudo apt update
Get:1 file:/var/cuda-repo-ubuntu2004-11-7-local  InRelease [1575 B]
Get:1 file:/var/cuda-repo-ubuntu2004-11-7-local  InRelease [1575 B]
Hit:2 http://ru.archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://ru.archive.ubuntu.com/ubuntu focal-updates InRelease    
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease        
Get:5 http://ru.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Hit:6 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease 
Hit:7 http://archive.ubuntu.com/ubuntu focal InRelease               
Hit:8 http://security.ubuntu.com/ubuntu focal-security InRelease     
Get:9 http://packages.microsoft.com/repos/code stable InRelease [10.4 kB]
Hit:10 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease
Get:11 https://repo.protonvpn.com/debian stable InRelease [2519 B]   
Hit:12 https://download.docker.com/linux/ubuntu focal InRelease      
Hit:13 http://ppa.launchpad.net/mkusb/ppa/ubuntu focal InRelease     
Hit:14 https://deb.nodesource.com/node_18.x focal InRelease          
Fetched 121 kB in 2s (72.7 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

and output of sudo apt upgrade:

dmitriy@dmitriy:/var$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.13.0-51-generic linux-hwe-5.13-headers-5.13.0-51
  linux-image-5.13.0-51-generic linux-modules-5.13.0-51-generic
  linux-modules-extra-5.13.0-51-generic
  linux-modules-nvidia-470-5.13.0-51-generic
  linux-objects-nvidia-470-5.13.0-51-generic
  linux-signatures-nvidia-5.13.0-51-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

This didn't help:

Unable to correct problems, you have held broken packages (15 answers) Any solution please?

Any suggestion please?

2 Answers2

0

Installing Aptitude is not a direct answer, but between apt, apt-get and synaptic, fixing dependency hell is quite difficult; aptitude is actually more user-friendly at it.

-1

aptitude

Install aptitude

sudo apt-get install aptitude

Install main package

sudo aptitude install cuda