Trying to install nvidia driver for ubuntu Desktop 18.04 LTS
Solution 1:
To solve the error, Install nvidia-kernel-source before installing driver by following command:
~$ sudo apt install nvidia-kernel-source-396
then instal driver by this command:
~$ sudo apt install nvidia-driver-396
Solution 2:
for your specific case, follow this steps exactly to be able to use the latest nvidia with your specific Nvidia card. I am assuming you have internet:
-
Add the Nvidia PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
On 18.04, you do not need to update the repositories. After you add a PPA, this is done automatically. After the update finishes, do this for your nvidia driver:
For Nvidia 390
sudo apt install nvidia-driver-390
For Nvidia 396 (The one am using for the 1080 which also applies to your 1060)
sudo apt install nvidia-driver-396
There is no need to install the nvidia-settings package since on 18.04, suggested and recommended packages are installed by default (at least to my knowledge) BUT in the case the nvidia-settings package does not get install then do
sudo apt install nvidia-settings
Also if you want Vulkan, then simply:
sudo apt install vulkan
After this, you can reboot the computer and you are done. Here is a screenshot of this steps working with a 1080 perfectly (Including Vulkan)