在 ubuntu 20.04 中安装 cuda 工具包时出现问题

在 ubuntu 20.04 中安装 cuda 工具包时出现问题

按照 CUDA Toolkit 11.7 下载中的所有说明操作后,最后一条说明

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 卡。

此后:

=yes dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-5.15.0-41-generic linux-hwe-5.15-headers-5.15.0-41
  linux-image-5.15.0-41-generic linux-modules-5.15.0-41-generic
  linux-modules-extra-5.15.0-41-generic
  linux-modules-nvidia-470-5.15.0-41-generic
  linux-objects-nvidia-470-5.15.0-41-generic
  linux-signatures-nvidia-5.15.0-41-generic
The following packages will be upgraded:
  apt-transport-https code containerd.io docker-ce docker-ce-cli
  docker-ce-rootless-extras dus git git-man gnome-control-center
  gnome-control-center-data gnome-control-center-faces guidus gvfs
  gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-fuse
  gvfs-libs iio-sensor-proxy isc-dhcp-client isc-dhcp-common
  libc6-arm64-cross libc6-dev-arm64-cross libfprint-2-2
  libfprint-2-tod1 libkeyutils1 libmbim-glib4 libmbim-proxy
  libmm-glib0 libqmi-glib5 libqmi-proxy libsensors-config
  libsensors5 libsensors5:i386 libxnvctrl0 lintian linux-firmware
  linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04
  linux-image-generic-hwe-20.04 linux-libc-dev
  linux-libc-dev-arm64-cross
  linux-modules-nvidia-470-generic-hwe-20.04 lm-sensors mkusb
  mkusb-common mkusb-nox mkusb-plug modemmanager nodejs
  nvidia-settings openssh-client protonvpn-cli protonvpn-gui
  python3-distupgrade python3-protonvpn-nm-lib sbsigntool snapd
  thunderbird thunderbird-gnome-support thunderbird-locale-en
  thunderbird-locale-en-gb thunderbird-locale-en-us
  thunderbird-locale-ru ubuntu-advantage-tools
  ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk
  unattended-upgrades update-notifier update-notifier-common
  usb-pack-efi xdg-desktop-portal xdg-desktop-portal-gtk
  xserver-common xserver-xephyr xserver-xorg-core
  xserver-xorg-legacy xwayland
80 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
18 standard security updates
Need to get 28.3 MB/623 MB of archives.
After this operation, 765 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-ubuntu2004-11-7-local  libxnvctrl0 515.43.04-0ubuntu1 [21.4 kB]
Err:1 file:/var/cuda-repo-ubuntu2004-11-7-local  libxnvctrl0 515.43.04-0ubuntu1
  File not found - /var/cuda-repo-ubuntu2004-11-7-local/./libxnvctrl0_515.43.04-0ubuntu1_amd64.deb (2: No such file or directory)
Get:2 file:/var/cuda-repo-ubuntu2004-11-7-local  nvidia-settings 515.43.04-0ubuntu1 [935 kB]
Err:2 file:/var/cuda-repo-ubuntu2004-11-7-local  nvidia-settings 515.43.04-0ubuntu1
  File not found - /var/cuda-repo-ubuntu2004-11-7-local/./nvidia-settings_515.43.04-0ubuntu1_amd64.deb (2: No such file or directory)
Get:3 https://deb.nodesource.com/node_18.x focal/main amd64 nodejs amd64 18.6.0-deb-1nodesource1 [28.3 MB]
Fetched 28.3 MB in 6s (4859 kB/s)  
E: Failed to fetch file:/var/cuda-repo-ubuntu2004-11-7-local/./libxnvctrl0_515.43.04-0ubuntu1_amd64.deb  File not found - /var/cuda-repo-ubuntu2004-11-7-local/./libxnvctrl0_515.43.04-0ubuntu1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/var/cuda-repo-ubuntu2004-11-7-local/./nvidia-settings_515.43.04-0ubuntu1_amd64.deb  File not found - /var/cuda-repo-ubuntu2004-11-7-local/./nvidia-settings_515.43.04-0ubuntu1_amd64.deb (2: No such file or directory)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

有什么解决办法吗?

相关内容