我手动删除了 Nvidia CUDA,这损坏了我的 Nvidia 驱动程序。我删除了所有 Nvidia 旧驱动程序和软件包,现在无论我怎么尝试,都无法重新安装驱动程序。
答:当我尝试时,sudo apt install nvidia-driver-510
我得到了这个:
❯ sudo apt install nvidia-driver-510
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libegl-mesa0:i386 libegl1:i386 libgbm1:i386 libgles2:i386 libnvidia-cfg1-510 libnvidia-common-510 libnvidia-compute-510:i386
libnvidia-decode-510 libnvidia-decode-510:i386 libnvidia-encode-510 libnvidia-encode-510:i386 libnvidia-extra-510 libnvidia-fbc1-510
libnvidia-fbc1-510:i386 libnvidia-gl-510 libnvidia-gl-510:i386 libopengl0:i386 libwayland-server0:i386 nvidia-compute-utils-510
nvidia-dkms-510 nvidia-kernel-common-510 nvidia-kernel-source-510 nvidia-prime nvidia-settings nvidia-utils-510 screen-resolution-extra
xserver-xorg-core xserver-xorg-video-nvidia-510
Suggested packages:
xfonts-100dpi | xfonts-75dpi xfonts-scalable
The following NEW packages will be installed:
libegl-mesa0:i386 libegl1:i386 libgbm1:i386 libgles2:i386 libnvidia-cfg1-510 libnvidia-common-510 libnvidia-compute-510:i386
libnvidia-decode-510 libnvidia-decode-510:i386 libnvidia-encode-510 libnvidia-encode-510:i386 libnvidia-extra-510 libnvidia-fbc1-510
libnvidia-fbc1-510:i386 libnvidia-gl-510 libnvidia-gl-510:i386 libopengl0:i386 libwayland-server0:i386 nvidia-compute-utils-510
nvidia-dkms-510 nvidia-driver-510 nvidia-kernel-common-510 nvidia-kernel-source-510 nvidia-prime nvidia-settings nvidia-utils-510
screen-resolution-extra xserver-xorg-core xserver-xorg-video-nvidia-510
0 upgraded, 29 newly installed, 0 to remove and 0 not upgraded.
Need to get 274 MB/274 MB of archives.
After this operation, 677 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gr.archive.ubuntu.com/ubuntu focal-updates/main amd64 xserver-xorg-core amd64 2:1.20.13-1ubuntu1~20.04.2 [1,339 kB]
Get:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 libnvidia-cfg1-510 510.47.03-0ubuntu1 [79.3 kB]
Err:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 libnvidia-cfg1-510 510.47.03-0ubuntu1
File has unexpected size (79336 != 79334). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:8f5a02ed17ee94b6b654813954395e8e706beaeab9d88a20a9b206c743632f8b2322dae0b0e11b71c4a80d6e95777bef161602452cc7a39b31228294e618a952
- SHA256:a118e3a281e4384e7d893a7ac161030b4349f5a1fb8e868efef1d839f355324e
- SHA1:1bb2e0897414475b4fc0ca54d165b471f81c7455 [weak]
- MD5Sum:2a749d8d0c15592650cdef6a2e733724 [weak]
- Filesize:79334 [weak]
Get:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 libnvidia-common-510 510.47.03-0ubuntu1 [10.3 kB]
Err:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 libnvidia-common-510 510.47.03-0ubuntu1
File has unexpected size (10272 != 10268). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:f8ca821093ba421b6654f1d03ff00c8e93f09f2e2b1134f0a148754f82b30427e38406bb3065bce5e362096a1ce3955912232176dbb569e5464cdfd3278c0e05
- SHA256:841bab9655273a43bc2e6a8fc4468b0b9114befda4dc28b0ef551acf9dde8da0
- SHA1:0cd86d68329c0139dd3b13c00fde910cf2e022ab [weak]
- MD5Sum:da6b782f5b37d8f9c1d6724b3f752cc1 [weak]
- Filesize:10268 [weak]
[OMITTED SOME ERRORS AS THE QUESTION WAS TOO LONG]
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./libnvidia-gl-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (168436082 != 168436078). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:42c3ce053f27af8184f2cde143fd1dfae2757ac79afef943f02f7042a153b70dd01c2d6fff047a69f55d9a28f2dcd8e543c1e696920689cf0a96880001a1892a
- SHA256:77f37644b2c3c3be8f4b2ce32b09bec2bdf7e4598152b77435eb16b99cf2d86e
- SHA1:37dec7e0a340d2f0ec7da4544d7ff10d61fe8543 [weak]
- MD5Sum:1abafdf15eb8ab8473c1e563c3b2589f [weak]
- Filesize:168436078 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./libnvidia-gl-510_510.47.03-0ubuntu1_i386.deb File has unexpected size (22997980 != 22997978). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:c7fa48dd2c2eb2b5a8d30270b4d54073fc1ba88c95d96d0a0199760457b36e03a78d77a2c7fd1a0b12f6b4dfd1bf381d642538f847421f5f530c054692695070
- SHA256:0a4ab50121d7360017c95d4a4e9834740d97598fbd9a8488c354aef0061be620
- SHA1:f5e2bff6659fcb064a0353ceee15b1bee40a5d59 [weak]
- MD5Sum:2bbed1ad658303b5bbcb15c01b65f649 [weak]
- Filesize:22997978 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./nvidia-compute-utils-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (351170 != 351168). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:afc9562289a5e95201fe9648a3a97251cf16b3dc276df63b74985bba425603ce737e364b24266dcb6c9a24f44bf1952212da7703fb4cfc1671143ed9a38fce01
- SHA256:db64d2daee0b2be91bd8a83c632d168d2ef80ae7bc88252871b5108f58ade484
- SHA1:27c0a5a1c0132d4352bbd2aaa0c6e3ca2b7130c0 [weak]
- MD5Sum:03ea0cdbe620df642785af3f7c8b25d8 [weak]
- Filesize:351168 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./nvidia-kernel-source-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (29148108 != 29148106). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:592809d439bd64cd95f0ed4311594f3687020207e013aad1862962bb2d3d1f3ccc5901958e350cb0ff6f4cfa44fb83dec841a3b4a3383e9e3a27472bb6b89d82
- SHA256:befae4050cd78417d53ee639b80e7c7924488b3dc4f42cb7cdb33c3fbd90a0a9
- SHA1:b7a46de62836ee000b8d65293e2ea293622e78cd [weak]
- MD5Sum:df494f99b6148692836483a60bda81ee [weak]
- Filesize:29148106 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./nvidia-kernel-common-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (20475412 != 20475410). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:9db25222c969d48117821dcdb230ce58d9a5bcf3cd45340bfba28effa3ba6d82e77391a2baeade24eb9f168880330884ba6796c5bb47b02c3cc14e9346b32261
- SHA256:7f1a63c13894b3256448a7fc27a543fe99b30ee0ce530bfb475b72a9d05e8758
- SHA1:eb544727a3d570395eab05a28f8c4dcc47c32e1c [weak]
- MD5Sum:c10a8c3dc0ec964a488ae2a6b5a9ddd9 [weak]
- Filesize:20475410 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./nvidia-dkms-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (29506 != 29502). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:04926ad2cf951a9ec67f1cef0386edefa8783f230a9f1c983525c838a60a8b3717212d75dc363dd3b0642cd2d682f36ee68149a236a9fc398985e4a01d8283ff
- SHA256:d83cd90912323b66fd68492571a59cb40b72164e6c0fcc6edaab85dec4c54488
- SHA1:ea354fa5f6b150fa0b26eab27503985198fd8663 [weak]
- MD5Sum:8a7f6f74fc8ed4ed37f09dc67a3dadde [weak]
- Filesize:29502 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./nvidia-utils-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (385746 != 385742). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:8a1ae07ce0bfa9cef48942d6bd01f5e591f1a106e72d61fddd1a58712287caefdc8747c32a9753a749f1fe48e1204f050262cf945f312c6b7b57d4065b747a75
- SHA256:295367f214acb6730f04069ccc0fad653142c476197d3d98373dcb4da96741ad
- SHA1:ac68c3074f0656d9dc5d51ccb68bdf1404c33456 [weak]
- MD5Sum:d9e3a78f46d5672169583131014c0290 [weak]
- Filesize:385742 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./xserver-xorg-video-nvidia-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (1396210 != 1396208). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:c4a40f5df40a72786ef2247e9f6bab3f806cc8e4b56006dec1c47d0246b64042d6a8ac82cbf29c1a946af9fdfb060ed361aec62cfa97357705029acb8a47a757
- SHA256:e0528992ab9174cd619a0ff7bf1ca520947bb4e4d4549e240396051f4754ba26
- SHA1:7c9d33b09abf974c4682b0de98431a1d659963a7 [weak]
- MD5Sum:9425c744e698207d84a1bb81141482ef [weak]
- Filesize:1396208 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./nvidia-driver-510_510.47.03-0ubuntu1_amd64.deb File has unexpected size (445970 != 445968). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:638dd734300038da04cfbdd10505d3fc658432c5172c4a9f249feb7c82234001f5aaee396048038d737d295fd99dc36e3e74453f659f228558387e81fc41e5b1
- SHA256:02c9b45d32b90f4bd7086c1e3be18c1fb03a748cce2d714e3e0d0435dcedea5c
- SHA1:956d68c8c927bc744ef7a3b6b4f586579ff68fbf [weak]
- MD5Sum:341da7c25b9eed2ea8c8b5a61fe8bfa9 [weak]
- Filesize:445968 [weak]
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/./nvidia-settings_510.47.03-0ubuntu1_amd64.deb File has unexpected size (899054 != 899052). Mirror sync in progress? [IP: 152.199.20.126 443]
Hashes of expected file:
- SHA512:5d465cd5ffd24baa02089be8f9e999b8b85b6aaf738f6394602ef7189dc858099b8242fa2139d7e7925e30891a2ab0c2d74a8986baa612da3b2a94e132ef1450
- SHA256:0f1acee3c8670578b207fb032dfd72f0ffbeb9217162c3161aca47ddb3c6bb1e
- SHA1:5e02e4b1acc30b3c994b8dae70e794ac74d141fc [weak]
- MD5Sum:1ced143ba53c79a905ac9682519431bd [weak]
- Filesize:899052 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
**B. 我从 Nvidia 网站下载 .run 文件,在尝试安装时出现以下信息:
An alternate method of installing the NVIDIA driver was detected. (This is
usually a package provided by your distributor.) A driver installed via that
method may integrate better with your system than a driver installed by
nvidia-installer.
Please review the message provided by the maintainer of this alternate
installation method and decide how to proceed:
进而:
ERROR: The Nouveau kernel driver is currently in use by your system. This
driver is incompatible with the NVIDIA driver, and must be disabled
before proceeding. Please consult the NVIDIA driver README and your
Linux distribution's documentation for details on how to correctly
disable the Nouveau kernel driver.
最后:
WARNING: One or more modprobe configuration files to disable Nouveau are
already present at:
/usr/lib/modprobe.d/nvidia-installer-disable-nouveau.conf,
/etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Please be
sure you have rebooted your system since these files were written.
If you have rebooted, then Nouveau may be enabled for other
reasons, such as being included in the system initial ramdisk or in
your X configuration file. Please consult the NVIDIA driver README
and your Linux distribution's documentation for details on how to
correctly disable the Nouveau kernel driver.
C. 当我尝试从软件和更新中选择驱动程序时,出现以下信息:
我该怎么做才能清除所有残留物并成功重新安装 Nvidia 驱动程序?