How to install the graphics card driver in CentOS
Note: After my CentOS installation is complete, I want to install a Linux video card driver on the Internet.
So we started to install it, and then follow the steps on the Internet, but the installation was always unsuccessful. Below I will post some of the errors I encountered. If you encounter the same problem, try the following method to see if it is suitable for your computer.
Install the driver. First, follow the prompts on the Internet to use yum Shenma, but it was not successful. Therefore, manually install the driver by downloading it.
First, check your kernel number:
# Uname-r
My kernel display: 2.6.32-431. el6.i686
I. First, download the driver. My computer is NVIDIA, so naturally first visit its official website: http://www.geforce.cn/drivers according to your own graphics card model, select the corresponding graphics card, download le, download is. run file.
Ii. OK. The next step is to install the compiling environment gcc, kernel-devel, and kernel-headers (of course, if your computer is already installed, you don't have to install it)
# Yum-y install gcc kernel-devel kernel-headers
3. Modify the/etc/modprobe. d/blacklist. conf file to prevent nouveau module from being loaded.
Method: Add blacklist nouveau and comment out blacklist nvidiafb.
Iv. Recreate the initramfs image File
# Mv/boot/initramfs-$ (uname-r). img/boot/initramfs-$ (uname-r). img. bak
# Dracut/boot/initramfs-$ (uname-r). img $ (uname-r)
The above steps are not bad with those on the Internet. The problem is coming.
V. input data on the terminal
# Init 3
Enter the text mode.
Cd to the directory where the downloaded graphics driver is located (that is, the NVIDIA-XXXX.run directory)
Run the following command in this directory:
# Sh NVIDIA-XXXX.run
An error occurred !! Error: unable to find the kernel source tree for the currently running kernel .........
What should I do ??? Don't worry. Replace the preceding statement with: #./NVIDIA-XXXX.run -- kernel-source-path =/usr/src/kernels/kernel number (2 + Tab key automatically appears)
Can this happen? Press enter to try it!
The above error is missing, but the new error is generated: unable to load the kernel module 'nvidia. ko '.........
What should I do ??? Changing. Change the preceding statement to #./NVIDIA-XXXX.run -- kernel-source-path =/usr/src/kernels/kernel number-k $ (uname-r)
Enter! OK! Successful!
VI: # init 5 return to interface mode