当前位置: 技术问答>linux和unix
nvidia显卡驱动的问题,都发了n个贴了,还没解决
来源: 互联网 发布时间:2015-07-22
本文导语: geforce4 mx 440 kernel : 2.4.20-8 redhat 9 通过运行NVchooser.sh,提示我安装NVIDIA_GLX-1.0-4191.i386.rpm和NVIDIA_kernel-1.0-4191.src.rpm init 3退出X rpmbuild --rebuild NVIDIA_kernel-1.0-4191.src.rpm 得到结果 Installing NVIDIA_kernel-1.0-4191.src.rpm ...
geforce4 mx 440 kernel : 2.4.20-8 redhat 9
通过运行NVchooser.sh,提示我安装NVIDIA_GLX-1.0-4191.i386.rpm和NVIDIA_kernel-1.0-4191.src.rpm
init 3退出X
rpmbuild --rebuild NVIDIA_kernel-1.0-4191.src.rpm
得到结果
Installing NVIDIA_kernel-1.0-4191.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.95241
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ cd /usr/src/redhat/BUILD
+ rm -rf NVIDIA_kernel-1.0-4191
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/NVIDIA_kernel-1.0-4191.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd NVIDIA_kernel-1.0-4191
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.95241
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd NVIDIA_kernel-1.0-4191
+ LANG=C
+ export LANG
+ set +e
++ rpm -q --queryformat '%{VERSION}' rpm
+ RPMVERSION=4.2
++ echo 4.2
++ awk -F . '{print $1;}'
+ RPMMAJOR=4
++ echo 4.2
++ awk -F . '{print $2;}'
+ RPMMINOR=2
++ echo 4.2
++ awk -F . '{print $3;}'
+ RPMPATCH=
+ '[' 4 -le 3 -a 2 -le 0 -a -lt 4 ']'
/var/tmp/rpm-tmp.95241: line 35: [: too many arguments
+ make nvidia.o
echo #define NV_COMPILER "`cc -v 2>&1 | tail -1`" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE
-D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=4191 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -I. -I/lib/modules/2.4.20-8/build/include -Wno-cast-qual nv.c
In file included from /lib/modules/2.4.20-8/build/include/linux/vmalloc.h:8,
from nv-linux.h:64,
from nv.c:14:
/lib/modules/2.4.20-8/build/include/linux/highmem.h: In function `bh_kmap':
/lib/modules/2.4.20-8/build/include/linux/highmem.h:20: warning: pointer of type `void *' used in arithmetic
nv.c: In function `nv_kern_mmap':
nv.c:1282: warning: passing arg 1 of `remap_page_range_R2baf18f2' makes pointer
from integer without a cast
nv.c:1282: incompatible type for argument 4 of `remap_page_range_R2baf18f2'
nv.c:1282: too few arguments to function `remap_page_range_R2baf18f2'
nv.c:1301: warning: passing arg 1 of `remap_page_range_R2baf18f2' makes pointer
from integer without a cast
nv.c:1301: incompatible type for argument 4 of `remap_page_range_R2baf18f2'
nv.c:1301: too few arguments to function `remap_page_range_R2baf18f2'
nv.c:1387: warning: passing arg 1 of `remap_page_range_R2baf18f2' makes pointer
from integer without a cast
nv.c:1387: incompatible type for argument 4 of `remap_page_range_R2baf18f2'
nv.c:1387: too few arguments to function `remap_page_range_R2baf18f2'
nv.c: In function `nv_get_phys_address':
nv.c:2250: warning: implicit declaration of function `pte_offset'
nv.c:2250: invalid type argument of `unary *'
make: *** [nv.o] Error 1
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.31558
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd NVIDIA_kernel-1.0-4191
+ LANG=C
+ export LANG
+ rm -f /tmp/files.lst
+ '[' -z '' ']'
++ uname -r
+ export TARGET_KERNEL=2.4.20-8
+ TARGET_KERNEL=2.4.20-8
+ '[' -d /lib/modules/2.4.20-8/kernel ']'
+ INSTALLPATH=/lib/modules/2.4.20-8/kernel/drivers/video
+ mkdir -p /var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.20-8/kernel/drivers/video+ install -m 0444 nvidia.o /var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.20-8/kernel/drivers/video
install: cannot stat `nvidia.o': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.31558 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.31558 (%install)
不能生成nvidia.o.
失败
若是直接装nvidia提供的.run格式的包,修改XF86Config文件的Driver "nv"为Driver "nvidia",删掉Load "dri",一startx就挂了,什么都显示不出来。
有谁能帮我解决吗?不胜感激!
通过运行NVchooser.sh,提示我安装NVIDIA_GLX-1.0-4191.i386.rpm和NVIDIA_kernel-1.0-4191.src.rpm
init 3退出X
rpmbuild --rebuild NVIDIA_kernel-1.0-4191.src.rpm
得到结果
Installing NVIDIA_kernel-1.0-4191.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.95241
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ cd /usr/src/redhat/BUILD
+ rm -rf NVIDIA_kernel-1.0-4191
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/NVIDIA_kernel-1.0-4191.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd NVIDIA_kernel-1.0-4191
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.95241
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd NVIDIA_kernel-1.0-4191
+ LANG=C
+ export LANG
+ set +e
++ rpm -q --queryformat '%{VERSION}' rpm
+ RPMVERSION=4.2
++ echo 4.2
++ awk -F . '{print $1;}'
+ RPMMAJOR=4
++ echo 4.2
++ awk -F . '{print $2;}'
+ RPMMINOR=2
++ echo 4.2
++ awk -F . '{print $3;}'
+ RPMPATCH=
+ '[' 4 -le 3 -a 2 -le 0 -a -lt 4 ']'
/var/tmp/rpm-tmp.95241: line 35: [: too many arguments
+ make nvidia.o
echo #define NV_COMPILER "`cc -v 2>&1 | tail -1`" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE
-D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=4191 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -I. -I/lib/modules/2.4.20-8/build/include -Wno-cast-qual nv.c
In file included from /lib/modules/2.4.20-8/build/include/linux/vmalloc.h:8,
from nv-linux.h:64,
from nv.c:14:
/lib/modules/2.4.20-8/build/include/linux/highmem.h: In function `bh_kmap':
/lib/modules/2.4.20-8/build/include/linux/highmem.h:20: warning: pointer of type `void *' used in arithmetic
nv.c: In function `nv_kern_mmap':
nv.c:1282: warning: passing arg 1 of `remap_page_range_R2baf18f2' makes pointer
from integer without a cast
nv.c:1282: incompatible type for argument 4 of `remap_page_range_R2baf18f2'
nv.c:1282: too few arguments to function `remap_page_range_R2baf18f2'
nv.c:1301: warning: passing arg 1 of `remap_page_range_R2baf18f2' makes pointer
from integer without a cast
nv.c:1301: incompatible type for argument 4 of `remap_page_range_R2baf18f2'
nv.c:1301: too few arguments to function `remap_page_range_R2baf18f2'
nv.c:1387: warning: passing arg 1 of `remap_page_range_R2baf18f2' makes pointer
from integer without a cast
nv.c:1387: incompatible type for argument 4 of `remap_page_range_R2baf18f2'
nv.c:1387: too few arguments to function `remap_page_range_R2baf18f2'
nv.c: In function `nv_get_phys_address':
nv.c:2250: warning: implicit declaration of function `pte_offset'
nv.c:2250: invalid type argument of `unary *'
make: *** [nv.o] Error 1
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.31558
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd NVIDIA_kernel-1.0-4191
+ LANG=C
+ export LANG
+ rm -f /tmp/files.lst
+ '[' -z '' ']'
++ uname -r
+ export TARGET_KERNEL=2.4.20-8
+ TARGET_KERNEL=2.4.20-8
+ '[' -d /lib/modules/2.4.20-8/kernel ']'
+ INSTALLPATH=/lib/modules/2.4.20-8/kernel/drivers/video
+ mkdir -p /var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.20-8/kernel/drivers/video+ install -m 0444 nvidia.o /var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.20-8/kernel/drivers/video
install: cannot stat `nvidia.o': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.31558 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.31558 (%install)
不能生成nvidia.o.
失败
若是直接装nvidia提供的.run格式的包,修改XF86Config文件的Driver "nv"为Driver "nvidia",删掉Load "dri",一startx就挂了,什么都显示不出来。
有谁能帮我解决吗?不胜感激!
|
还有可能需要安装内核的源代码包
|
按ctrl+alt+back可以退出X,看到显示的信息。