Ant*_*sto 4 package-management nvidia dependencies cuda
已解决,最初的问题以及所有错误消息和尝试如下。
对于那些将来访问此页面的人:
评论中建议的原始问题和尝试
昨天,我的 Ubuntu 20.04 机器意识到它存在 CUDA 冲突。我无法修复它们,因此我决定使用nvidia 网站上的说明卸载它:
sudo apt-get --purge remove <package_name> # Ubuntu
Run Code Online (Sandbox Code Playgroud)
我可能做出了一些错误的选择,但我不知道是哪一个。
然后我按照此处的说明进行操作,适用于 Ubuntu。我最终到达此页面并按照说明进行操作。
这就是我所拥有的:
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-6 (>= 11.6.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
然后:
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-6 (>= 11.6.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
然后,
sudo apt-get install cuda-runtime-11-6
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-runtime-11-6 : Depends: cuda-drivers (>= 510.39.01) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
然后,
sudo apt-get install cuda-drivers
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-drivers : Depends: cuda-drivers-510 (= 510.47.03-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
然后,
sudo apt-get install cuda-drivers-510
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-drivers-510 : Depends: nvidia-driver-510 (>= 510.47.03) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
然后,
sudo apt-get install nvidia-driver-510
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:
nvidia-driver-510 : Depends: nvidia-dkms-510 (= 510.47.03-0ubuntu1)
Depends: nvidia-kernel-source-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
Depends: libnvidia-compute-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
Depends: libnvidia-extra-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
Depends: nvidia-compute-utils-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
Depends: libnvidia-decode-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
Depends: libnvidia-encode-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
Depends: nvidia-utils-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
Recommends: libnvidia-compute-510:i386 (= 510.47.03-0ubuntu1)
Recommends: libnvidia-decode-510:i386 (= 510.47.03-0ubuntu1)
Recommends: libnvidia-encode-510:i386 (= 510.47.03-0ubuntu1)
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
sudo apt-get install nvidia-dkms-510
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:
nvidia-dkms-510 : Depends: nvidia-kernel-source-510 but it is not going to be installed
Depends: nvidia-kernel-common-510 (= 510.47.03-0ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
等等。
我不是系统管理员:我只需要在这台 Linux 机器上安装 nvidia。我保证我进行了大量的网络搜索,但找不到具有清晰且可操作说明的来源。
有没有人能够理解这种混乱的原因,并可以建议一个带有明确说明的解决方案/网页?我不想重新安装操作系统,请告诉我这是否是唯一的解决方案。
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#pre-installation-actions
按照评论中的要求:
ls -al /etc/apt/preferences.d/cuda-repository-pin-600
4 -rw-rw-r-- 1 user user 190 Jun 29 2020 /etc/apt/preferences.d/cuda-repository-pin-600
cat /etc/apt/preferences.d/cuda-repository-pin-600
Package: nsight-compute
Pin: origin *ubuntu.com*
Pin-Priority: -1
Package: nsight-systems
Pin: origin *ubuntu.com*
Pin-Priority: -1
Package: *
Pin: release l=NVIDIA CUDA
Pin-Priority: 600
apt-cache policy cuda cuda-drivers nvidia-dkms-510
cuda:
Installed: (none)
Candidate: 11.6.0-1
Version table:
11.6.0-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
600 file:/var/cuda-repo-ubuntu2004-11-6-local Packages
11.5.2-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.5.1-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.5.0-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.4.4-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.4.3-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.4.2-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.4.1-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.4.0-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.3.1-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
600 file:/var/cuda-repo-ubuntu2004-11-3-local Packages
11.3.0-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.2.2-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.2.1-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.2.0-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.1.1-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.1.0-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.0.3-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
11.0.2-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
cuda-drivers:
Installed: (none)
Candidate: 510.47.03-1
Version table:
510.47.03-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
510.39.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
600 file:/var/cuda-repo-ubuntu2004-11-6-local Packages
495.29.05-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
470.103.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
470.82.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
470.57.02-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
470.42.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
465.19.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
600 file:/var/cuda-repo-ubuntu2004-11-3-local Packages
460.106.00-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
460.91.03-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
460.73.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
460.32.03-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
460.27.04-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
455.45.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
455.32.00-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
455.23.05-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.172.01-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.156.00-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.142.00-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.119.04-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.119.03-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.102.04-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.80.02-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.51.06-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
450.51.05-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
nvidia-dkms-510:
Installed: (none)
Candidate: 510.47.03-0ubuntu1
Version table:
510.47.03-0ubuntu1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
510.47.03-0ubuntu0.20.04.1 500
500 http://it.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages
510.39.01-0ubuntu1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
600 file:/var/cuda-repo-ubuntu2004-11-6-local Packages
Run Code Online (Sandbox Code Playgroud)
输出:ls -al /var/cuda-repo-ubuntu2004-11-6-local/
4 -rw-r--r-- 1 root root 1633 Jan 11 07:07 7fa2af80.pub
4 -rw-r--r-- 1 root root 2394 Jan 11 07:07 cuda_11.6.0-1_amd64.deb
4 -rw-r--r-- 1 root root 2448 Jan 11 07:07 cuda-11-6_11.6.0-1_amd64.deb
1020 -rw-r--r-- 1 root root 1040544 Jan 11 07:07 cuda-cccl-11-6_11.6.55-1_amd64.deb
4 -rw-r--r-- 1 root root 2464 Jan 11 07:07 cuda-command-line-tools-11-6_11.6.0-1_amd64.deb
15044 -rw-r--r-- 1 root root 15403332 Jan 11 07:07 cuda-compat-11-6_510.39.01-1_amd64.deb
4 -rw-r--r-- 1 root root 2428 Jan 11 07:07 cuda-compiler-11-6_11.6.0-1_amd64.deb
160 -rw-r--r-- 1 root root 160604 Jan 11 07:07 cuda-cudart-11-6_11.6.55-1_amd64.deb
740 -rw-r--r-- 1 root root 753790 Jan 11 07:07 cuda-cudart-dev-11-6_11.6.55-1_amd64.deb
116 -rw-r--r-- 1 root root 115138 Jan 11 07:07 cuda-cuobjdump-11-6_11.6.55-1_amd64.deb
12752 -rw-r--r-- 1 root root 13054952 Jan 11 07:07 cuda-cupti-11-6_11.6.55-1_amd64.deb
2444 -rw-r--r-- 1 root root 2500758 Jan 11 07:07 cuda-cupti-dev-11-6_11.6.55-1_amd64.deb
184 -rw-r--r-- 1 root root 188182 Jan 11 07:07 cuda-cuxxfilt-11-6_11.6.55-1_amd64.deb
3888 -rw-r--r-- 1 root root 3977988 Jan 11 07:07 cuda-demo-suite-11-6_11.6.55-1_amd64.deb
52 -rw-r--r-- 1 root root 49872 Jan 11 07:07 cuda-documentation-11-6_11.6.55-1_amd64.deb
28 -rw-r--r-- 1 root root 27070 Jan 11 07:07 cuda-driver-dev-11-6_11.6.55-1_amd64.deb
4 -rw-r--r-- 1 root root 2500 Jan 11 07:07 cuda-drivers_510.39.01-1_amd64.deb
4 -rw-r--r-- 1 root root 2616 Jan 11 07:07 cuda-drivers-510_510.39.01-1_amd64.deb
4 -rw-r--r-- 1 root root 3170 Jan 11 07:07 cuda-drivers-fabricmanager_510.39.01-1_amd64.deb
4 -rw-r--r-- 1 root root 3206 Jan 11 07:07 cuda-drivers-fabricmanager-510_510.39.01-1_amd64.deb
4008 -rw-r--r-- 1 root root 4103954 Jan 11 07:07 cuda-gdb-11-6_11.6.55-1_amd64.deb
58716 -rw-r--r-- 1 root root 60123814 Jan 11 07:07 cuda-gdb-src-11-6_11.6.55-1_amd64.deb
4 -rw-r--r-- 1 root root 2508 Jan 11 07:07 cuda-libraries-11-6_11.6.0-1_amd64.deb
4 -rw-r--r-- 1 root root 2530 Jan 11 07:07 cuda-libraries-dev-11-6_11.6.0-1_amd64.deb
140 -rw-r--r-- 1 root root 142296 Jan 11 07:07 cuda-memcheck-11-6_11.6.55-1_amd64.deb
4 -rw-r--r-- 1 root root 2440 Jan 11 07:07 cuda-minimal-build-11-6_11.6.0-1_amd64.deb
115832 -rw-r--r-- 1 root root 118608806 Jan 11 07:07 cuda-nsight-11-6_11.6.55-1_amd64.deb
4 -rw-r--r-- 1 root root 3706 Jan 11 07:07 cuda-nsight-compute-11-6_11.6.0-1_amd64.deb
4 -rw-r--r-- 1 root root 3306 Jan 11 07:07 cuda-nsight-systems-11-6_11.6.0-1_amd64.deb
34948 -rw-r--r-- 1 root root 35785836 Jan 11 07:07 cuda-nvcc-11-6_11.6.55-1_amd64.deb
32044 -rw-r--r-- 1 root root 32809456 Jan 11 07:07 cuda-nvdisasm-11-6_11.6.55-1_amd64.deb
76 -rw-r--r-- 1 root root 77328 Jan 11 07:07 cuda-nvml-dev-11-6_11.6.55-1_amd64.deb
1904 -rw-r--r-- 1 root root 1946136 Jan 11 07:07 cuda-nvprof-11-6_11.6.55-1_amd64.deb
60 -rw-r--r-- 1 root root 57516 Jan 11 07:07 cuda-nvprune-11-6_11.6.55-1_amd64.deb
14628 -rw-r--r-- 1 root root 14978358 Jan 11 07:07 cuda-nvrtc-11-6_11.6.55-1_amd64.deb
73704 -rw-r--r-- 1 root root 75471468 Jan 11 07:07 cuda-nvrtc-dev-11-6_11.6.55-1_amd64.deb
52 -rw-r--r-- 1 root root 51380 Jan 11 07:07 cuda-nvtx-11-6_11.6.55-1_amd64.deb
109924 -rw-r--r-- 1 root root 112555442 Jan 11 07:07 cuda-nvvp-11-6_11.6.58-1_amd64.deb
4 -rw-r--r-- 1 root root 2426 Jan 11 07:07 cuda-runtime-11-6_11.6.0-1_amd64.deb
16 -rw-r--r-- 1 root root 16288 Jan 11 07:07 cuda-samples-11-6_11.6.101-1_amd64.deb
8328 -rw-r--r-- 1 root root 8527458 Jan 11 07:07 cuda-sanitizer-11-6_11.6.55-1_amd64.deb
4 -rw-r--r-- 1 root root 3372 Jan 11 07:07 cuda-toolkit-11-6_11.6.0-1_amd64.deb
16 -rw-r--r-- 1 root root 16308 Jan 11 07:07 cuda-toolkit-11-6-config-common_11.6.55-1_all.deb
16 -rw-r--r-- 1 root root 16342 Jan 11 07:07 cuda-toolkit-11-config-common_11.6.55-1_all.deb
16 -rw-r--r-- 1 root root 16330 Jan 11 07:07 cuda-toolkit-config-common_11.6.55-1_all.deb
4 -rw-r--r-- 1 root root 2390 Jan 11 07:07 cuda-tools-11-6_11.6.0-1_amd64.deb
4 -rw-r--r-- 1 root root 190 Jan 11 07:07 cuda-ubuntu2004.pin
4 -rw-r--r-- 1 root root 2868 Jan 11 07:07 cuda-visual-tools-11-6_11.6.0-1_amd64.deb
37980 -rw-r--r-- 1 root root 38890708 Jan 11 07:07 gds-tools-11-6_1.2.0.100-1_amd64.deb
210464 -rw-r--r-- 1 root root 215509372 Jan 11 07:07 libcublas-11-6_11.8.1.74-1_amd64.deb
214852 -rw-r--r-- 1 root root 220001236 Jan 11 07:07 libcublas-dev-11-6_11.8.1.74-1_amd64.deb
66720 -rw-r--r-- 1 root root 68320046 Jan 11 07:07 libcufft-11-6_10.7.0.55-1_amd64.deb
148744 -rw-r--r-- 1 root root 152311988 Jan 11 07:07 libcufft-dev-11-6_10.7.0.55-1_amd64.deb
456 -rw-r--r-- 1 root root 466618 Jan 11 07:07 libcufile-11-6_1.2.0.100-1_amd64.deb
7516 -rw-r--r-- 1 root root 7693178 Jan 11 07:07 libcufile-dev-11-6_1.2.0.100-1_amd64.deb
40568 -rw-r--r-- 1 root root 41540444 Jan 11 07:07 libcurand-11-6_10.2.9.55-1_amd64.deb
40896 -rw-r--r-- 1 root root 41876588 Jan 11 07:07 libcurand-dev-11-6_10.2.9.55-1_amd64.deb
46640 -rw-r--r-- 1 root root 47753052 Jan 11 07:07 libcusolver-11-6_11.3.2.55-1_amd64.deb
30376 -rw-r--r-- 1 root root 31103978 Jan 11 07:07 libcusolver-dev-11-6_11.3.2.55-1_amd64.deb
96244 -rw-r--r-- 1 root root 98547234 Jan 11 07:07 libcusparse-11-6_11.7.1.55-1_amd64.deb
96376 -rw-r--r-- 1 root root 98683226 Jan 11 07:07 libcusparse-dev-11-6_11.7.1.55-1_amd64.deb
80636 -rw-r--r-- 1 root root 82565404 Jan 11 07:07 libnpp-11-6_11.6.0.55-1_amd64.deb
79012 -rw-r--r-- 1 root root 80907982 Jan 11 07:07 libnpp-dev-11-6_11.6.0.55-1_amd64.deb
8 -rw-r--r-- 1 root root 6900 Jan 11 07:07 libnvidia-cfg1-430_510.39.01-0ubuntu1_amd64.deb
80 -rw-r--r-- 1 root root 79374 Jan 11 07:07 libnvidia-cfg1-510_510.39.01-0ubuntu1_amd64.deb
8 -rw-r--r-- 1 root root 6892 Jan 11 07:07 libnvidia-common-430_510.39.01-0ubunt
确认您的 BIOS 中已禁用安全启动。
dpkg -l *nvidia*显示没有安装 Nvidia 软件。
确认dkms status没有显示任何剩余的 Nvidia 内核模块:
nvidia, 510.47.03, 5.13.0-28-generic, x86_64: installed
Run Code Online (Sandbox Code Playgroud)
如果有的话,我们必须dkms remove:
sudo dkms remove nvidia/510.47.03 -k 5.13.0-28-generic
ii libnvidia-compute-510:i386 510.47.03-0ubuntu1 i386 NVIDIA libcompute package
ii libnvidia-decode-510:i386 510.47.03-0ubuntu1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-510:i386 510.47.03-0ubuntu1 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-510:i386 510.47.03-0ubuntu1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
Run Code Online (Sandbox Code Playgroud)
sudo apt purge package_name
打开附加驱动程序
选择noveau驱动程序并重新启动。
选择 Nvidia 510(经过测试、专有)驱动程序并重新启动。
在终端类型中nvidia-smi
下载并安装 CUDA 11.6。https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_local
重启
| 归档时间: |
|
| 查看次数: |
9320 次 |
| 最近记录: |