在遵循所有说明在 CUDA Toolkit 11.7 Downloads 中,最后一条指令
sudo apt-get -y install cuda
对我不起作用。
终端显示此消息:
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.
附言:我的电脑里有一张 NVIDIA Geforce 920MX 卡。
我尝试这个:添加 PPA 后如何解决未满足的依赖关系?(14 个答案)
我执行此命令后得到了此信息sudo apt-get -u dist-upgrade
,但是出现了相同的错误:
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
输出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.
并输出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.
这没有帮助:
无法纠正问题,您持有破损的包裹(15 个答案)有什么解决方案吗?
请问有什么建议吗?
答案1
安装 Aptitude 并不是一个直接的答案,但是在 apt、apt-get 和 synaptic 之间,修复依赖地狱相当困难;aptitude 实际上对此更加用户友好。
答案2
资质
Install aptitude
sudo apt-get install aptitude
Install main package
sudo aptitude install cuda