Ubuntu 20.04에 업데이트된 커널이 포함된 NVidia 드라이버를 설치하는 데 권장되는 방법은 무엇입니까? apt를 통한 설치가 작동하지 않습니다. 설치가 끝나면 다음과 같은 오류가 발생합니다.
# sudo apt install nvidia-driver-495 -y
...
...
Building for 5.15.1-051501-generic
Building for architecture x86_64
Building initial module for 5.15.1-051501-generic
ERROR (dkms apport): kernel package linux-headers-5.15.1-051501-generic is not supported
Error! Bad return status for module build on kernel: 5.15.1-051501-generic (x86_64)
Consult /var/lib/dkms/nvidia/495.44/build/make.log for more information.
dpkg: error processing package nvidia-dkms-495 (--configure):
installed nvidia-dkms-495 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-495:
nvidia-driver-495 depends on nvidia-dkms-495 (<= 495.44-1); however:
Package nvidia-dkms-495 is not configured yet.
nvidia-driver-495 depends on nvidia-dkms-495 (>= 495.44); however:
Package nvidia-dkms-495 is not configured yet.
dpkg: error processing package nvidia-driver-495 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
...
내 하드웨어에 대한 정보는 다음과 같습니다(노트북은 Lenovo P15S Gen1 AFAIK입니다).
# uname -r
5.15.1-051501-generic
# lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 02)
2d:00.0 3D controller: NVIDIA Corporation GP108GLM [Quadro P520] (rev a1)
# lscpu | grep -i model
Model name: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Model: 142
현재 저는 Intel GPU를 사용하고 있지만 전용 NVidia GPU를 사용하지 않고 계속 가지고 다니지는 않았으면 좋겠습니다.
/var/lib/dkms/nvidia/495.44/build/make.log
파일 끝에 이것이 있습니다 .
/var/lib/dkms/nvidia/495.44/build/nvidia/nv-dma.c:976: warning: "IMPORT_SGT_STUBS_NEEDED" redefined
976 | #define IMPORT_SGT_STUBS_NEEDED 0
|
/var/lib/dkms/nvidia/495.44/build/nvidia/nv-dma.c:970: note: this is the location of the previous definition
970 | #define IMPORT_SGT_STUBS_NEEDED 1
|
/var/lib/dkms/nvidia/495.44/build/nvidia/nv-mmap.c: In function ‘nv_encode_caching’:
/var/lib/dkms/nvidia/495.44/build/nvidia/nv-mmap.c:334:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
334 | if (NV_ALLOW_CACHING(memory_type))
| ^
/var/lib/dkms/nvidia/495.44/build/nvidia/nv-mmap.c:337:9: note: here
337 | default:
| ^~~~~~~
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv-cray.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv-cray.o'
make[2]: *** Waiting for unfinished jobs....
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv-i2c.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv-i2c.o'
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv-p2p.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv-p2p.o'
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv-mmap.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv-mmap.o'
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv-pci.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv-pci.o'
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv-dma.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv-dma.o'
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv-acpi.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv-acpi.o'
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
scripts/basic/fixdep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by scripts/basic/fixdep)
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/nvidia/495.44/build/nvidia/nv.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/nvidia/495.44/build/nvidia/nv.o'
make[1]: *** [Makefile:1874: /var/lib/dkms/nvidia/495.44/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.1-051501-generic'
make: *** [Makefile:80: modules] Error 2
나이든 운전자들에게도 같은 문제가 있었습니다. 메인라인 커널에는 현재 Ubuntu 21.04에서만 사용할 수 있는 v2.33 이상의 glibc가 필요한 것 같습니다.
답변1
해결책은 다음과 같습니다. 내 게시물에서 볼 수 있듯이 make.log 파일에는 glibc >= 2.33이 필요하다고 나와 있지만 Ubuntu 20.04에서는 glibc 2.31( ldconfig --version
)을 사용합니다.
때문에Nmath의코멘트를 작성하고 하룻밤을 자고 나서 내 워크스테이션에서 1080 Ti GPU와 Ubuntu 20.04를 실행하고 있는 커널을 확인했습니다. 이 커널은 Nvidia 드라이버와 함께 작동합니다. 제 경우에는 현재 커널 버전입니다 5.11.0-40-generic
. 이 커널로 부팅한 후 메인라인 애플리케이션을 통해 설치한 최신 커널을 모두 제거했습니다. 다음 재부팅 후 명령을 통해 최신 NVidia 드라이버를 설치했습니다 sudo apt install nvidia-driver-495
. 원본 커널이 glibc 2.31을 사용하여 빌드되었기 때문에 이번에는 문제 없이 드라이버 설치가 작동했습니다.
그 후 부팅 후 검은 화면이 나타났습니다. Ctrl+ Alt+ 를 통해 터미널로 전환했습니다 F2. 터미널에서 xorg.conf 파일을 백업하고 sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
nvidia 드라이버가 /etc/modprobe.d/
및 /lib/modprobe.d/
. 그리고 마지막으로 sudo prime-select intel
Intel 드라이버로 전환 하고 sudo prime-select nvidia
다시 Nvidia 드라이버로 전환했습니다. 다시 재부팅한 후에는 작동했습니다.