Computer

Ubuntu20.04 nvidia-driver installation Error

Opti-Mr 2024. 5. 3. 20:34
반응형

https://www.nvidia.com/Download/index.aspx?lang=en-us

Go to that url and select the correct spec of your GPU

Download .run file

$ chmod +x ./NVIDIA-Linux-x86._64-525.116.04.run

$ sudo sh ./NVIDIA-Linux-×86._64-525.116.04.run

ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the'--kernel-source-path' command line option.

--> You need something before install the driver

What do we need?

Check it in this url

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu

Follow that instruction

$ uname -r

5.4.0-177-generic

$ sudo apt-get install linux-headers-5.4.0-177-generic

$ sudo apt-key del 7fa2af80

Keep going to install nvidia-driver

$ sudo sh ./NVIDIA-Linux-×86._64-525.116.04.run

There will be some question and warning, but just enter again and again.

 

$ nvidia-smi

OKAYYYYY

반응형