CentOS5.4/RHEL5.4上安装nvidia官方驱动

针对的系统是CentOS 5.4 ,

 

显卡型号为:NVIDIA GeForce 9800 GT

 

从http://www.nvidia.cn/Download/index.aspx?lang=cn找到驱动并下载

 

 

安装时一直报类似下面的错:

Using: nvidia-installer ncurses user interface
-> Tagging shared libraries with chcon -t textrel_shlib_t.
-> License accepted.
-> Installing NVIDIA driver version 190.53.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
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.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com.

官方的这个驱动以前也装过好多次,每次都是这样的错,这次一定要装上。于是,疯狂的在网上找资料。最终功夫不负有心人,安装成功。

首先看了内核版本:
uname -r
2.6.18-164.11.1.el5xen
原来是xen的内核,这种内核是装不上nvidia的驱动的(网上说的)
yum install kernel kernel-devel
reboot
在开机时选择上面装的内核启动


init 3
进入命令界面, cd 到安装包所在的目录:
 sh NVIDIA-Linux-x86-190.53-pkg1.run
一路YES下去,哈哈,终于安装成功!

如果看到报错信息中有"gcc"方面的错,应该是你gcc没有安装
yum install gcc

你可能感兴趣的:(CentOS5.4/RHEL5.4上安装nvidia官方驱动)