/var/log/nvidia-installer.log文件内容:
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Thu Feb 20 19:22:22 2014
installer version: 331.49
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
nvidia-installer command line:
./nvidia-installer
Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 331.49.
-> Running distribution scripts
executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed! Continue installation anyway? (Answer: Yes)
-> Performing CC sanity 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.
lz是缺失了驱动的依赖kernel-devel。首先要安装kernel-devel才能继续安装驱动。不过kernel-devel是rpm的东西。
在ubuntu下,安装的不一样,打开终端,输入sudo apt-get install linux-headers-generic,安装好之后再安装驱动。
编译安装驱动很麻烦
安装nvidia的驱动,直接安装软件源里面的就行了吧,非要安装331这个版本吗?
上面的错误提示你先装上当前linux内核的源码包。
sudo apt-get install linux-source本回答被提问者采纳