Comment 2 for bug 595440

Revision history for this message
Patrick (94bc1052) wrote : Re: package linux-image-2.6.32-23-generic 2.6.32-23.37 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 2

This bug report sucks a little, since the output of apt is in Italian. If anyone wants the error message in English, here you go:

########################################################################
[root@detox: ~]# apt-get install linux-headers-2.6.32-23-generic linux-headers-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-2.6.32-23-generic is already the newest version.
linux-headers-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-headers-2.6.32-23-generic (2.6.32-23.37) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 2.6.32-23-generic /boot/vmlinuz-2.6.32-23-generic
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common 2.6.32-23-generic /boot/vmlinuz-2.6.32-23-generic
run-parts: /etc/kernel/header_postinst.d/nvidia-common exited with return code 10
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-2.6.32-23-generic.postinst line 110.
dpkg: error processing linux-headers-2.6.32-23-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-headers-generic:
 linux-headers-generic depends on linux-headers-2.6.32-23-generic; however:
  Package linux-headers-2.6.32-23-generic is not configured yet.
dpkg: error processing linux-headers-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 linux-headers-2.6.32-23-generic
 linux-headers-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
########################################################################

As you can see, the script at /etc/kernel/header_postinst.d/nvidia-common fails.
The content of the script is:

########################################################################
#!/bin/bash -e
. /usr/share/debconf/confmodule
db_set nvidia-common/obsolete-driver false
db_input high nvidia-common/obsolete-driver || true

if [ -x /usr/bin/nvidia-detector ]; then
    LATEST=$(nvidia-detector)
    if [ ${LATEST} ] && [ "${LATEST}" != "none" ]; then
        db_fset nvidia-common/obsolete-driver seen false
        db_subst nvidia-common/obsolete-driver latest $LATEST
        db_input high nvidia-common/obsolete-driver || true
        db_go || true
    fi
fi
########################################################################

I'd greatly appreciate any help in order to fix this! I don't just want to add an exit 0 to the end of the script.