NVIDIA 설치 프로그램이 커널 소스/빌드 파일(kernel.org에서 컴파일됨)을 찾을 수 없습니다.

NVIDIA 설치 프로그램이 커널 소스/빌드 파일(kernel.org에서 컴파일됨)을 찾을 수 없습니다.

방금 Fedora 15 시스템에 kernel.org에서 새로운 3.0-rc2 커널을 컴파일하고 설치했습니다. 모든 것이 제대로 작동하는 것 같으며 시스템으로 성공적으로 부팅할 수 있습니다. 그러나 이로 인해 이전에 설치한 NVIDIA 드라이버가 손상되었으므로 새 드라이버를 컴파일해야 했습니다. nvidia.com에서 설치 프로그램을 다운로드했지만 설치하는 데 문제가 있습니다.

커널을 컴파일하기 위해 커널 아카이브의 압축을 홈 디렉터리에 풀고 새 커널에 대해 Fedora 구성을 재사용했습니다. 모든 것이 에 있습니다 ~/linux_build/linux-3.0-rc2.

런레벨 3으로 부팅한 후 NVIDIA 설치 프로그램에 오류가 발생합니다.

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.

다음과 같이 설치 프로그램을 실행합니다.

bash NVIDIA-Linux-x86_64-270.41.19.run --kernel-source-path=/home/tja/linux_build/linux-3.0-rc2

일반적으로 이 문제는 에서 커널 헤더를 설치하면 해결되지만 yum여기서는 RPM을 사용할 수 없는 새 커널을 사용하고 있습니다.

NVIDIA 설치 프로그램에 필요한 헤더/소스 파일을 수동으로 설치하려면 어떻게 해야 합니까?

답변1

글쎄, 난 미친 게 아니야. NVIDIA 설치 프로그램에 패치가 필요합니다. 커널 버전 2.7.0이 상한으로 하드코딩되어 있습니다. 간단한 패치로 3.1.0으로의 업그레이드가 가능합니다.

패치 파일은 다음과 같습니다.nvidia-patch@fedoraforum.org

--- conftest.sh.orig    2011-05-30 12:24:39.770031044 -0400
+++ conftest.sh 2011-05-30 12:25:49.059315428 -0400
@@ -76,7 +76,7 @@
 }

 build_cflags() {
-    BASE_CFLAGS="-D__KERNEL__ \
+    BASE_CFLAGS="-O2 -D__KERNEL__ \
 -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
 -nostdinc -isystem $ISYSTEM"

--- nv-linux.h.orig 2011-05-30 12:27:09.341819608 -0400
+++ nv-linux.h  2011-05-30 12:27:28.854951411 -0400
@@ -32,7 +32,7 @@
 #  define KERNEL_2_4
 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  error This driver does not support 2.5 kernels!
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
 #  define KERNEL_2_6
 #else
 #  error This driver does not support development kernels!

그런 다음 NVIDIA 설치 프로그램에서 파일을 추출해야 합니다.

./NVIDIA-Linux-x86_64-270.41.19.run -x

그런 다음 "kernel" 디렉터리에는 패치가 필요한 파일이 있습니다.

cd NVIDIA-Linux-x86_64-270.41.19/kernel/
patch -p0 kernel-3.0-rc1.patch.txt

완료되면 커널 소스를 설치 프로그램에 대한 인수로 제공하십시오.

./nvidia-installer --kernel-source-path /home/tja/linux/linux-3.0-rc2

...그리고 잘 지어졌어요!

이제 올바른 Nvidia 드라이버를 사용하여 Linux 3을 실행할 수 있습니다.

관련 정보