升级到 xubuntu 22.04 后 lib-nih 出现问题

升级到 xubuntu 22.04 后 lib-nih 出现问题

我有同样的问题这个人。刚刚升级了我的 Xubuntu,在升级过程中收到了这些消息 - 现在,当我尝试安装这些软件包的更新时,它不起作用。我发现了一个错误日志:

DKMS make.log for nvidia-470.141.03 for kernel 5.15.0-46-generic (x86_64)
Fri Aug 19 12:06:32 PM MDT 2022
make[2]: Entering directory '/usr/src/linux-headers-5.15.0-46-generic'
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
make[2]: /usr/bin/gcc: No such file or directory
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)
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
  You are using:           
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/470.141.03/build \
single-build= \
need-builtin=1 need-modorder=1

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/470.141.03/build/Kbuild:194: cc_sanity_check] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1881: /var/lib/dkms/nvidia/470.141.03/build] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.15.0-46-generic'
make: *** [Makefile:80: modules] Error 2

这是在安装 NIh 库后尝试运行或安装失败的进程之一。

按照apt-cache policy上一个问题的一条评论中的建议,我看到了 Jammy 的所有来源,但没有 Bionic 的来源。

此外,我的显示器现在也出现了问题——它不允许我更改分辨率,一直停留在 1024x768。我认为这是因为它无法更新 nvidia 驱动程序之类的,但很难确定。

答案1

好的,我成功解决了!

首先,我运行了“sudo apt autoremove”,删除了 616 个过时的软件包,使用 synaptic 卸载了导致问题的两个 NIH 软件包及其依赖项,然后将我的 nvidia 驱动程序切换到 x.org 开源驱动程序。此后,我的计算机不再抱怨无法更新 NIH 库,但我仍然无法更改屏幕分辨率。此外,驱动程序页面声称它使用的是手动安装的驱动程序,不允许我更改它。为了解决这个问题,我按照以下说明进行操作这个帖子,并更改为最新的 nvidia 驱动程序。之后,一切正常。

相关内容