LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2249|回复: 21

lfs在没有内核源码的情况下如何安装NVIDIA驱动

[复制链接]
发表于 2009-4-15 23:07:58 | 显示全部楼层 |阅读模式
内核源码编译好后让我删除了,因为安装驱动需要源码就把原来的config文件拿来,重新编译了内核,但还是提示找不到内核

[PHP]
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Wed Apr 15 21:39:58 2009

option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : false
  uninstall               : false
  driver info             : false
  precompiled interfaces  : true
  no ncurses color        : false
  query latest version    : false
  OpenGL header files     : true
  no questions            : false
  silent                  : false
  no recursion            : false
  no backup               : false
  kernel module only      : false
  sanity                  : false
  add this kernel         : false
  no runlevel check       : false
  no network              : false
  no ABI note             : false
  no RPMs                 : false
  no kernel module        : false
  force SELinux           : default
  no X server check       : false
  force tls               : (not specified)
  X install prefix        : (not specified)
  X library install path  : (not specified)
  X module install path   : (not specified)
  OpenGL install prefix   : (not specified)
  OpenGL install libdir   : (not specified)
  utility install prefix  : (not specified)
  utility install libdir  : (not specified)
  doc install prefix      : (not specified)
  kernel name             : (not specified)
  kernel include path     : (not specified)
  kernel source path      : (not specified)
  kernel output path      : (not specified)
  kernel install path     : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp mirror              : ftp://download.nvidia.com
  RPM file list           : (not specified)

Unable to load: nvidia-installer ncurses user interface

Using built-in stream user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
   ke the installer to attempt to download a kernel interface for your kernel f
   rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: No)
-> No precompiled kernel interface was found to match your kernel; this means
   that the installer will need to compile a new kernel interface.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/2.6.28.8/source'
-> Kernel output path: '/lib/modules/2.6.28.8/build'
ERROR: If you are using a Linux 2.4 kernel, please make sure
       you either have configured kernel sources matching your
       kernel or the correct set of kernel headers installed
       on your system.
      
       If you are using a Linux 2.6 kernel, please make sure
       you have configured kernel sources matching your kernel
       installed on your system. If you specified a separate
       output directory using either the "KBUILD_OUTPUT" or
       the "O" KBUILD parameter, make sure to specify this
       directory with the SYSOUT environment variable or with
       the equivalent nvidia-installer command line option.
      
       Depending on where and how the kernel sources (or the
       kernel headers) were installed, you may need to specify
       their location with the SYSSRC environment variable or
       the equivalent nvidia-installer 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.
[/PHP]
发表于 2009-4-16 19:34:38 | 显示全部楼层
重新安装源码树不行吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-17 08:51:26 | 显示全部楼层
版主说的重新安装源代码树是不是就是重新编译内核,我已经重新编译过了,源代码存放的路径有没有具体的要求,我放到了/usr/src下,并建了个linux的软连接,但我安装lfs编译内核的时候并不是放在这个路径的,我的显卡是Quadro NVS 140M,用的驱动版本是NVIDIA-Linux-x86-100.14.23-pkg1.run
回复 支持 反对

使用道具 举报

发表于 2009-4-18 07:20:31 | 显示全部楼层
不是重新编译内核,是重新安装内核的源码并将其配置好(让它生成 config.h)後,再去编译显驱

其实说穿了,显驱也就是内核模块而矣,所以编译它要相同当前版本内核的源码树
回复 支持 反对

使用道具 举报

发表于 2009-4-18 09:09:53 | 显示全部楼层
这个问题,
似乎、好象、大概……
我遇上过,
安装好内核以后,
装N卡驱动时,
提示找不到内核,
没办法完成安装显卡驱动。


参考解决方法如下:

1、
去重新下载一个相同版本的内核,
解压缩后,
记录下所放置的位置。
比如我把解压缩后的内核放在/tmp这里,
则正确的路径是:
/tmp/linux-内核版本号

2、
接着退回到字符模式里面,
运行NVIDIA-Linux-x86-100.14.23-pkg1.run
等系统提示找不到内核时,
你赶紧输入刚刚放置内核的路径:
/tmp/linux-内核版本号
接着按回车就行了。

3、
按照安装N卡的国际惯例,
修改xorg.conf文件,
把“Driver "nv"”
(或者Driver "vesa"、Driver "fbdev")
修改为Driver "nvidia"。
找到Section "Module"字段:
检查注释掉Load "dri"和Load "GLCore"
检查加入Load "glx"。

4、
!·#¥%……—*
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-21 18:23:26 | 显示全部楼层
请问版主怎么才能生成config.h这个文件?
回复 支持 反对

使用道具 举报

发表于 2009-4-21 19:39:20 | 显示全部楼层
就是配置好内核就会自动生成,所以你把旧内核的 config 读入然後再保存就行了
回复 支持 反对

使用道具 举报

发表于 2009-4-21 19:45:56 | 显示全部楼层
Post by 青铜镜;1976024
2、
接着退回到字符模式里面,
运行NVIDIA-Linux-x86-100.14.23-pkg1.run
[color="Red"]等系统提示找不到内核时,
你赶紧输入刚刚放置内核的路径:
/tmp/linux-内核版本号
接着按回车就行了。

今天我在公司试了一下,好像碰到相同问题了

但是当系统提示找不到内核的时候,根本没有机会去输入任何路径。我又试用 --kernel-sources-path=xxxxxx,同样没戏 :(

请问镜兄是怎样去输入路径的?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-21 22:23:51 | 显示全部楼层
Post by d00m3d;1977566
就是配置好内核就会自动生成,所以你把旧内核的 config 读入然後再保存就行了

把旧的config文件读入保存后报
[PHP]nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Apr 21 22:08:52 2009

option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : false
  uninstall               : false
  driver info             : false
  precompiled interfaces  : true
  no ncurses color        : false
  query latest version    : false
  OpenGL header files     : true
  no questions            : false
  silent                  : false
  no recursion            : false
  no backup               : false
  kernel module only      : false
  sanity                  : false
  add this kernel         : false
  no runlevel check       : false
  no network              : false
  no ABI note             : false
  no RPMs                 : false
  no kernel module        : false
  force SELinux           : default
  no X server check       : false
  force tls               : (not specified)
  X install prefix        : (not specified)
  X library install path  : (not specified)
  X module install path   : (not specified)
  OpenGL install prefix   : (not specified)
  OpenGL install libdir   : (not specified)
  utility install prefix  : (not specified)
  utility install libdir  : (not specified)
  doc install prefix      : (not specified)
  kernel name             : (not specified)
  kernel include path     : (not specified)
  kernel source path      : (not specified)
  kernel output path      : (not specified)
  kernel install path     : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp mirror              : ftp://download.nvidia.com
  RPM file list           : (not specified)

Unable to load: nvidia-installer ncurses user interface

Using built-in stream user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
   ke the installer to attempt to download a kernel interface for your kernel f
   rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: No)
-> No precompiled kernel interface was found to match your kernel; this means
   that the installer will need to compile a new kernel interface.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
ERROR: The kernel header file
       '/lib/modules/2.6.28.8/build/include/linux/version.h' does not exist.
       The most likely reason for this is that the kernel source files in
       '/lib/modules/2.6.28.8/build' have not been configured.
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.
[/PHP]
然后我又执行了
make oldconfig
make include/linux/version.h
接着报
[PHP]nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Apr 21 22:12:47 2009

option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : false
  uninstall               : false
  driver info             : false
  precompiled interfaces  : true
  no ncurses color        : false
  query latest version    : false
  OpenGL header files     : true
  no questions            : false
  silent                  : false
  no recursion            : false
  no backup               : false
  kernel module only      : false
  sanity                  : false
  add this kernel         : false
  no runlevel check       : false
  no network              : false
  no ABI note             : false
  no RPMs                 : false
  no kernel module        : false
  force SELinux           : default
  no X server check       : false
  force tls               : (not specified)
  X install prefix        : (not specified)
  X library install path  : (not specified)
  X module install path   : (not specified)
  OpenGL install prefix   : (not specified)
  OpenGL install libdir   : (not specified)
  utility install prefix  : (not specified)
  utility install libdir  : (not specified)
  doc install prefix      : (not specified)
  kernel name             : (not specified)
  kernel include path     : (not specified)
  kernel source path      : (not specified)
  kernel output path      : (not specified)
  kernel install path     : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp mirror              : ftp://download.nvidia.com
  RPM file list           : (not specified)

Unable to load: nvidia-installer ncurses user interface

Using built-in stream user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
   ke the installer to attempt to download a kernel interface for your kernel f
   rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: No)
-> No precompiled kernel interface was found to match your kernel; this means
   that the installer will need to compile a new kernel interface.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
ERROR: Unable to determine the version of the kernel sources located in
       '/lib/modules/2.6.28.8/source'.  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.
[/PHP]
弄来弄去问题又回到原来的位置了,我试着用--kernel-source-path也是不行
回复 支持 反对

使用道具 举报

发表于 2009-4-23 08:28:53 | 显示全部楼层
Post by d00m3d;1977574
今天我在公司试了一下,好像碰到相同问题了

但是当系统提示找不到内核的时候,根本没有机会去输入任何路径。我又试用 --kernel-sources-path=xxxxxx,同样没戏 :(

请问镜兄是怎样去输入路径的?





我当时就是用这个方法安装上的:

--kernel-sources-path=/tmp/linux-版本号

你仔细再看看出错说明,
并多试几次。


我并不是一次就安装成功,
系统提示找不到内核后退出安装,
我把内核解压缩后记录路径,
又再重新运行安装文件,
才安装上驱动。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表