0

I tried to install Nvidia driver in Ubuntu 16.04, I download the package from the official website and excute the command

sudo sh ./NVIDIA-Linux-x86_64-384.183.run –no-opengl-files

However, An error happened with

/nvidia-installer: invalid option: "–no-opengl-files"

ERROR: Invalid commandline, please run `./nvidia-installer --help` for usage information.

Could somebody give me a solution?

singrium
  • 6,880
  • 1
    The solution is not to shoot in your foot and NOT try to install drivers from a run files. There is a ton of manuals how to install Nvidia drivers on Ubuntu. – Pilot6 Feb 26 '19 at 12:17
  • 1
    Welcome to [ubuntu.se]! Could you provide a link to the install instructions on the official website? There should likely be -- (two hyphens) instead of an en dash in the beginning of –no-opengl-files. – Melebius Feb 26 '19 at 12:28

2 Answers2

1

Try to remove the installed drivers by running:

sudo apt-get purge nvidia*  
sudo apt remove nvidia-*  
sudo apt autoremove  

see which is the recommended driver for your Nvidia card by running:

ubuntu-drivers devices

If you want to install the driver automatically, run :

sudo ubuntu-drivers autoinstall

If you want to install a specific driver, run:

sudo apt install nvidia-<driver number>

Once the installation is finished, run prime-select query to check which graphic card is being used by your device.
If you want to change the graphic card used by your PC, run : sudo prime-select <intel/ nvidia>; choose between Nvidia and Intel graphic cards.
After that, restart your PC to apply changes

singrium
  • 6,880
0

The solution is to run

sudo apt-get install nvidia-384

You don't need a run file for that.

Another option is to use Software & Updates -> Additional Drivers GUI for that purpose.

Pilot6
  • 90,100
  • 91
  • 213
  • 324