今天我从 Ubuntu 19.10 升级到了 20.04 LTS。在安装过程中,我已经收到一条错误,提示 nvidia-driver-435 安装失败。
不,我一直尝试手动安装它,但出现以下错误:
DKMS make.log for nvidia-435.21 for kernel 5.3.0-40-generic (x86_64) wo 13 mei 2020 9:43:26 CEST make[1]: Entering directory
'/usr/src/linux-headers-5.3.0-40-generic' arch/x86/Makefile:147:
CONFIG_X86_X32 enabled but no binutils support make[1]: /usr/bin/gcc:
Command not found test -e include/generated/autoconf.h -a -e
include/config/auto.conf || ( \ echo >&2;
\ echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or
include/config/auto.conf are missing.";\ echo >&2 " Run 'make
oldconfig && make prepare' on kernel src to fix it."; \ echo >&2
; \ /bin/false)
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/435.21/build
need-modorder=1 /bin/sh: 1: cc: not found
The C compiler '/usr/bin/gcc' does not appear to be able to create
object files. Please make sure you have your Linux distribution's
libc development package installed and that '/usr/bin/gcc' is a valid
C compiler name.
*** Failed CC sanity check. Bailing out! ***
make[2]: *** [/var/lib/dkms/nvidia/435.21/build/Kbuild:192:
cc_sanity_check] Error 1 make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1655:
_module_/var/lib/dkms/nvidia/435.21/build] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-40-generic' make: ***
[Makefile:81: modules] Error 2
我也尝试安装 nvidia-driver-440,但结果相同。
当我重启时,屏幕完全不工作。当我使用以前的内核版本重启时,我的笔记本电脑屏幕可以工作,但第二个显示器不工作。
更新:正如其中一个答案所述,这是一个错误。恢复到 nvidia-390 应该可以解决问题,但就我而言并没有。
这是安装 390 的错误,非常相似:
DKMS make.log for nvidia-390.132 for kernel 5.4.0-29-generic (x86_64)
wo 13 mei 2020 11:59:31 CEST
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-29-generic'
arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support
make[1]: /usr/bin/gcc: Command not found
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/390.132/build \
single-build= \
need-builtin=1 need-modorder=1
/bin/sh: 1: cc: not found
The C compiler '/usr/bin/gcc' does not appear to be able to
create object files. Please make sure you have
your Linux distribution's libc development package
installed and that '/usr/bin/gcc' is a valid C compiler
name.
*** Failed CC sanity check. Bailing out! ***
make[2]: *** [/var/lib/dkms/nvidia/390.132/build/Kbuild:192: cc_sanity_check] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1719: /var/lib/dkms/nvidia/390.132/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-29-generic'
make: *** [Makefile:81: modules] Error 2
答案1
报告为错误 1860306
来自评论:
390.116 版中的 nvidia 390 驱动程序已修复此问题(在内核 5.3.0-26 上测试)。请参阅#1851162
所以您需要回退到 390 版本。较新的版本可能需要更新,并且将很快跟进。