无法安装 nvidia 驱动程序 - 无法找到软件包

无法安装 nvidia 驱动程序 - 无法找到软件包

[更新] 我可以使用

sudo apt-get install nvidia-375

但以下问题仍然存在于 381 中。[/更新]

所以昨晚我决定按照我在网上找到的一些步骤将我的 nvidia 驱动程序更新到 381。以下是我遵循的步骤:

sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-381

每当我输入“sudo apt-get install nvidia-381”命令时,我都会收到“无法找到包 nvidia-381”

我到处都搜索过了,但找不到解决方案。有什么想法吗?

这是我的输出:

tyler@tyler-ubuntu:~$ sudo add-apt-repository ppa:graphics-drivers/ppa
 Fresh drivers from upstream, currently shipping Nvidia.

## Current Status

Current official release: `nvidia-381` (381.22)
Current long-lived branch release: `nvidia-375` (375.66)

For G8x, G9x and GT2xx GPUs use `nvidia-340` (340.102)
For NV4x and G7x GPUs use `nvidia-304` (304.135)

Support timeframes for Unix legacy GPU releases:
https://nvidia.custhelp.com/app/answers/detail/a_id/3142

## What we're working on right now:

- Normal driver updates
- Help Wanted: Mesa Updates for Intel/AMD users, ping us if you want to help do this work, we're shorthanded.

## WARNINGS:

This PPA is currently in testing, you should be experienced with packaging before you dive in here:

Volunteers welcome! See also: https://github.com/mamarley/nvidia-graphics-drivers/

### How you can help:

## Install PTS and benchmark your gear:

    sudo apt-get install phoronix-test-suite

Run the benchmark:

    phoronix-test-suite default-benchmark openarena xonotic tesseract gputest unigine-valley

and then say yes when it asks you to submit your results to openbechmarking.org. Then grab a cup of coffee, it takes a bit for the benchmarks to run. Depending on the version of Ubuntu you're using it might preferable for you to grabs PTS from upstream directly: http://www.phoronix-test-suite.com/?k=downloads

## Share your results with the community:

Post a link to your results (or any other feedback to): https://launchpad.net/~graphics-drivers-testers

Remember to rerun and resubmit the benchmarks after driver upgrades, this will allow us to gather a bunch of data on performance that we can share with everybody.

If you run into old documentation referring to other PPAs, you can help us by consolidating references to this PPA.

If someone wants to go ahead and start prototyping on `software-properties-gtk` on what the GUI should look like, please start hacking!

## Help us Help You!

We use the donation funds to get the developers hardware to test and upload these drivers, please consider donating to the "community" slider on the donation page if you're loving this PPA:

http://www.ubuntu.com/download/desktop/contribute
 More info: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpf35j9cfi/pubring.gpg' created
gpg: /tmp/tmpf35j9cfi/trustdb.gpg: trustdb created
gpg: key FCAE110B1118213C: public key "Launchpad PPA for Graphics Drivers Team" imported
gpg: Total number processed: 1
gpg:               imported: 1
OK
tyler@tyler-ubuntu:~$ sudo apt-get update
Hit:1 http://repo.steampowered.com/steam precise InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 http://packages.microsoft.com/repos/vscode stable InRelease              
Hit:4 http://us.archive.ubuntu.com/ubuntu zesty InRelease                      
Hit:5 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu zesty InRelease     
Hit:6 http://dl.google.com/linux/chrome/deb stable Release                     
Get:7 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]     
Hit:8 http://us.archive.ubuntu.com/ubuntu zesty-updates InRelease              
Get:9 http://us.archive.ubuntu.com/ubuntu zesty-backports InRelease [89.2 kB]  
Hit:10 http://ppa.launchpad.net/noobslab/macbuntu/ubuntu zesty InRelease       
Hit:11 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu zesty InRelease         
Fetched 178 kB in 0s (204 kB/s)                                                
Reading package lists... Done
tyler@tyler-ubuntu:~$ sudo apt-get install nvidia-381
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package nvidia-381

附加输出:

tyler@tyler-ubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu 17.04"
tyler@tyler-ubuntu:~$ apt-cache policy nvidia-381
N: Unable to locate package nvidia-381

答案1

因为这是 Google 上关于这个主题的排名靠前的返回搜索,所以我想发布这个帖子,因为看起来事情已经发生了变化。

惯于在全新安装 Ubuntu Desktop 18.0.4 后为我工作:

sudo apt install nvidia-396

将要

sudo apt install nvidia-driver-396

不知道为什么语法会改变。网络上关于安装 Nvidia 驱动程序的大量信息让人困惑。浪费了这么多时间!

答案2

第二条命令是错误的。应该是:

sudo add-apt-repository ppa:graphics-drivers/ppa

答案3

问题解决了。

在“软件和更新”>“其他软件”中验证我的 PPA 时,我注意到图形驱动程序 PPA 在 PPA 列表中被多次列出。我删除了所有与图形驱动程序相关的 PPA,并从头开始安装,最终找到并安装了 nvidia-381 驱动程序。

我不确定为什么该存储库被列出这么多次,但尽管如此,在删除并再次安装后它终于起作用了。

答案4

常见的问题是您当前版本的 ubuntu 在其 apt 包管理器中没有您正在寻找的驱动程序(或者驱动程序的名称与您期望的不同)。

要查看 apt 存储库中适用于你的 ubuntu 版本的驱动程序,请访问 packages.ubuntu.com 并搜索‘nvidia’。然后选择你的 ubuntu 版本(xenial、bionic、focal 等),它会向你显示哪些驱动程序可通过 apt 安装。

如果你想要的 nvidia-driver 版本不存在,那么你可以尝试从 .run 文件安装驱动程序nvidia 网站上提供,但是如果您的 ubuntu 版本与 nvidia-driver 相比太旧,您可能会遇到问题。

相关内容