LinuxSir.cn,穿越时空的Linuxsir!

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

觉得自己安装 nvidia 驱动的方式很繁琐,请大家指教一个简单的方法

[复制链接]
发表于 2008-4-18 16:13:46 | 显示全部楼层 |阅读模式
我安装nvidia驱动的步骤:
1. 从 nvidia 网站上下载对应驱动
2. 在没启动 X 的debian之下运行 nvidia 驱动
     安装过程中,按程序提示操作,安装完毕

问题:
     在每次安装新内核的时候,驱动在新内核下不起作用,只能回到安装了驱动的那个内核下,卸载已安装上的 nvidia 驱动, 才可以在新内核下安装nvidia驱动.而且nvidia 驱动只对应那个内核有效,如果选另一个内核启动就无效(X 不能启动)


求教:
1. 怎样才可以装上驱动后对新旧安装内核都有效?最好不要卸载再安装。
2. 即使要卸载驱动再安装,也希望能对所有内核有效。


谢谢!
发表于 2008-4-18 21:26:47 | 显示全部楼层
可以这样
apt-get install module-assistant
module-assistant prepare (abbreviate to m-a)
m-a a-i nvidia
可以自动下载需要得软件包,自动编译安装内核得模块
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-21 10:12:02 | 显示全部楼层
我的电脑不可以上网,自动下载虽然很好,但在这个时候会受限制。
btw, 驱动我已经下好放在盘里了
回复 支持 反对

使用道具 举报

发表于 2008-4-21 14:58:52 | 显示全部楼层
apt-get install nvidia-kernel-2.6.18-6-686
我用系统的,感觉已经足够用了。
回复 支持 反对

使用道具 举报

发表于 2008-4-23 14:01:55 | 显示全部楼层
2.6.18用系统的足够了,不过升级到2.6.24以后,连X都起不来,只能装驱动,我是nv 7600gs的显卡
回复 支持 反对

使用道具 举报

发表于 2008-4-25 05:38:52 | 显示全部楼层
# module-assistant prepare
Getting source for kernel version: 2.6.22-3-686
apt-get install linux-headers-2.6.22-3-686
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
E: 无法找到软件包 linux-headers-2.6.22-3-686
Creating symlink...
apt-get install build-essential
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
build-essential 已经是最新的版本了。
build-essential 被设置为手动安装。
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 186 个软件未被升级。

Done!
回复 支持 反对

使用道具 举报

发表于 2008-4-25 19:01:14 | 显示全部楼层
./Nvidiaxxx.run -A
显示:
  -K, --kernel-module-only
      Install a kernel module only, and do not uninstall the
      existing driver.  This is intended to be used to install
      kernel modules for additional kernels (in cases where you
      might boot between several different kernels).  To use this
      option, you must already have a driver installed, and the
      version of the installed driver must match the version of
      this kernel module.
我想这个可以解决你的问题
回复 支持 反对

使用道具 举报

发表于 2008-4-25 22:19:38 | 显示全部楼层
这点必须称赞一下fedora,加好livna源后,yum install kmod-nvidia 就装好了。

以Debian的技术力量,应该也轻松实现才对,可是……
回复 支持 反对

使用道具 举报

发表于 2008-4-27 06:22:10 | 显示全部楼层
uname -a
Linux debian 2.6.22-3-686 #1 SMP Mon Nov 12 08:32:57 UTC 2007 i686 GNU/Linux




./NVIDIA-Linux-x86-173.08-pkg1.run

产生的log!

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sun Apr 27 06:11:53 2008

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
  no cc version 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)

Using: nvidia-installer ncurses user interface
WARNING: Skipping the runlevel check (the utility `runlevel` failed to run).
-> 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: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
   this means that the installer will need to compile a kernel interface for
   your kernel.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> The CC version check failed:
   
   The compiler used to compile the kernel (gcc 4.1) does not exactly match the
   current compiler (gcc 4.2).  The Linux 2.6 kernel module loader rejects kern
   el modules built with a version of gcc that does not exactly match that of t
   he compiler used to build the running kernel.
   
   If you know what you are doing and want to ignore the gcc version check, sel
   ect "No" to continue installation.  Otherwise, select "Yes" to abort install
   ation, set the CC environment variable to the name of the compiler used to c
   ompile your kernel, and restart installation.  Abort now? (Answer: Yes)
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.
回复 支持 反对

使用道具 举报

发表于 2008-4-27 17:09:02 | 显示全部楼层
Post by anntonny;1843002
uname -a
Linux debian 2.6.22-3-686 #1 SMP Mon Nov 12 08:32:57 UTC 2007 i686 GNU/Linux




./NVIDIA-Linux-x86-173.08-pkg1.run

产生的log!

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sun Apr 27 06:11:53 2008

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
  no cc version 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)

Using: nvidia-installer ncurses user interface
WARNING: Skipping the runlevel check (the utility `runlevel` failed to run).
-> 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: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
   this means that the installer will need to compile a kernel interface for
   your kernel.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> The CC version check failed:
   
   The compiler used to compile the kernel (gcc 4.1) does not exactly match the
   current compiler (gcc 4.2).  The Linux 2.6 kernel module loader rejects kern
   el modules built with a version of gcc that does not exactly match that of t
   he compiler used to build the running kernel.
   
   If you know what you are doing and want to ignore the gcc version check, sel
   ect "No" to continue installation.  Otherwise, select "Yes" to abort install
   ation, set the CC environment variable to the name of the compiler used to c
   ompile your kernel, and restart installation.  Abort now? (Answer: Yes)
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.


玩 Linux 的,多多少少都应该会点英文吧

它的提示已经很清楚了, 当前的 gcc 版本和用来编译当前内核的 gcc 的版本不同, 这都看不明白?
回复 支持 反对

使用道具 举报

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

本版积分规则

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