Reproduced on a different kernel + driver combination from the
original report, which suggests the defect is in the
linux-modules-nvidia-* postinst pattern itself, not a single
kernel/driver pair.
Environment
-----------
Ubuntu 24.04, HWE kernel
Failing package: linux-modules-nvidia-535-6.17.0-29-generic
(6.17.0-29.29~24.04.1+1)
Trigger: /usr/bin/unattended-upgrade pulled the new nvidia
module package for kernel 6.17.0-29 without the
matching linux-headers-6.17.0-29-generic.
Error (from /var/log/apt/term.log)
----------------------------------
linux-image-nvidia-6.17.0-29-generic: constructing .ko files
/usr/bin/ld.bfd: cannot open linker script file
/usr/src/linux-headers-6.17.0-29-generic/scripts/module.lds:
No such file or directory
sha256sum: nvidia.ko: No such file or directory
...
dpkg: error processing package
linux-modules-nvidia-535-6.17.0-29-generic (--configure):
installed ... post-installation script subprocess returned
error exit status 1
Declared dependencies (apt-cache show)
--------------------------------------
linux-modules-nvidia-535-6.17.0-29-generic:
Depends: linux-image-6.17.0-29-generic | linux-image-unsigned-...,
linux-signatures-nvidia-6.17.0-29-generic,
linux-objects-nvidia-535-6.17.0-29-generic,
nvidia-kernel-common-535
(no dependency on linux-headers-6.17.0-29-generic)
linux-objects-nvidia-535-6.17.0-29-generic:
Depends: binutils
(ships the linker but not the kernel's scripts/module.lds)
Workaround that fixed it
------------------------
sudo apt install linux-headers-6.17.0-29-generic
sudo apt --fix-broken install
After-effects before workaround
-------------------------------
Boot into 6.17.0-29 came up without a working graphical
session, which cascaded into NetworkManager not coming up
cleanly — visible to the user as "no network on the new
kernel", though the network kernel modules themselves were
present in /lib/modules/6.17.0-29-generic/.
Suggested fix
-------------
linux-modules-nvidia-<flavor>-<kver>-generic should
Depends: linux-headers-<kver>-generic, since its postinst
runs ld.bfd against
/usr/src/linux-headers-<kver>-generic/scripts/module.lds.
Alternatively, ship that linker script inside
linux-objects-nvidia-* so the postinst is self-contained.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2115148
Title:
nvidia driver error: cannot open linker script file
To manage notifications about this bug go to:
https://bugs.launchpad.net/nvidia-drivers-ubuntu/+bug/2115148/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs