Nvidia drivers unable to install

Unable to install nvidia drivers — unable to locate package

[Update] I’m able to install the 375 drivers fine using

but the issue below still persists with 381.[/Update]

So last night I decided to update my nvidia drivers to 381 following some steps I found online. Here are the steps I followed:

Whenever I get to «sudo apt-get install nvidia-381» command I receive «Unable to locate package nvidia-381»

I’ve searched everywhere and can’t find a solution this. Any ideas?

Here is my output:

6 Answers 6

Because this is a top listed return search on Google on the subject, I wanted to post this because it seems things have changed.

This won’t work for me after a fresh Ubuntu Desktop 18.0.4 install:

This will:

No idea why the syntax changed. Makes for a lot of information on installing Nvidia drivers on the web confusing. So much wasted time!

The second command is wrong. It should be:

When verifying my PPA’s in Software & Updates > Other Software I noticed that the graphics-drivers PPA was listed SEVERAL times in the PPA list. I removed all of the PPA’s related to graphics-drivers and started the install over from scratch and it finally located and installed the nvidia-381 drivers.

I’m not sure why the repository was listed so many times but none-the-less after removing and going through the install again it finally worked.

sudo apt install nvidia-396

For GeForce 8 and 9 series GPUs use nvidia-340

For GeForce 6 and 7 series GPUs use nvidia-304

The generic problem is that your current version of ubuntu doesn’t have the driver you are looking for in its apt package manager (or the driver is named something different from what you expect).

To see the which drivers are available for your ubuntu version in the apt repository, go to packages.ubuntu.com and search for ‘nvidia’. Then select your ubuntu version (xenial, bionic, focal, etc.), and it will show you which drivers are available for installation through apt.

If the nvidia-driver version that you want isn’t there, then you can take your chances with installing the driver from the .run file provided on the nvidia website, but if your ubuntu version is too old compared to the nvidia-driver, you might run into issues.