/etc/kernel/postinst.d/nvidia-common exited with return code 2 - Can't locate Debconf/Element/Dialog.pm

Bug #595440 reported by Igor Moiseev
134
This bug affects 20 people
Affects Status Importance Assigned to Milestone
nvidia-common (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: nvidia-common

my@host~$ sudo apt-get dselect-upgrade
[sudo] password for my:
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
0 aggiornati, 0 installati, 0 da rimuovere e 1 non aggiornati.
5 non completamente installati o rimossi.
Dopo quest'operazione, verranno occupati 0B di spazio su disco.
Continuare [S/n]? s
Configurazione di linux-image-2.6.32-23-generic (2.6.32-23.37)...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-23-generic
Running postinst hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.32-23-generic
Found kernel: /boot/vmlinuz-2.6.32-22-generic
Found kernel: /boot/vmlinuz-2.6.31-21-generic
Found kernel: /boot/vmlinuz-2.6.28-18-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/nvidia-common 2.6.32-23-generic /boot/vmlinuz-2.6.32-23-generic
debconf: Impossibile caricare Debconf::Element::Dialog. Fallito perché: Can't locate Debconf/Element/Dialog.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 26) line 2, <GEN0> line 2.
BEGIN failed--compilation aborted at (eval 26) line 2, <GEN0> line 2.

Can't locate object method "new" via package "Debconf::Element::Dialog" (perhaps you forgot to load "Debconf::Element::Dialog"?) at /usr/share/perl5/Debconf/FrontEnd.pm line 68, <GEN0> line 2.
run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-23-generic.postinst line 1003.
dpkg: errore nell'elaborare linux-image-2.6.32-23-generic (--configure):
 il sottoprocesso vecchio script di post-installation ha restituito lo stato di errore 2
dpkg: problemi con le dipendenze impediscono la configurazione di linux-image-generic:
 linux-image-generic dipende da linux-image-2.6.32-23-generic; comunque:
  Il pacchetto linux-image-2.6.32-23-generic non è ancora configurato.
dpkg: errore nell'elaborare linux-image-generic (--configure):
 problemi con le dipendenze - lasciato non configurato
dpkg: problemi con le dipendenze impediscono la configurazione di linux-generic:
 linux-generic dipende da linux-image-generic (= 2.6.32.23.24); comunque:
  Il pacchetto linux-image-generic non è ancora configurato.
dpkg: errore nell'elaborare linux-generic (--configure):
 problemi con le dipendenze - lasciato non configurato
Configurazione di linux-headers-2.6.32-23-generic (2.6.32-23.37)...
Non è stata scritta alcuna segnalazione apport poiché il messaggio di errore indica che è un errore da un fallimento precedente.
                                                                                                                                Non è stata scritta alcuna segnalazione apport poiché il messaggio di errore indica che è un errore da un fallimento precedente.
                                                                               Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common 2.6.32-23-generic /boot/vmlinuz-2.6.32-23-generic
debconf: Impossibile caricare Debconf::Element::Dialog. Fallito perché: Can't locate Debconf/Element/Dialog.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 26) line 2, <GEN0> line 2.
BEGIN failed--compilation aborted at (eval 26) line 2, <GEN0> line 2.

Can't locate object method "new" via package "Debconf::Element::Dialog" (perhaps you forgot to load "Debconf::Element::Dialog"?) at /usr/share/perl5/Debconf/FrontEnd.pm line 68, <GEN0> line 2.
run-parts: /etc/kernel/header_postinst.d/nvidia-common exited with return code 2
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-2.6.32-23-generic.postinst line 110.
dpkg: errore nell'elaborare linux-headers-2.6.32-23-generic (--configure):
 il sottoprocesso vecchio script di post-installation ha restituito lo stato di errore 2
dpkg: problemi con le dipendenze impediscono la configurazione di linux-headers-generic:
 linux-headers-generic dipende da linux-headers-2.6.32-23-generic; comunque:
  Il pacchetto linux-headers-2.6.32-23-generic non è ancora configurato.
dpkg: errore nell'elaborare linux-headers-generic (--configure):
 problemi con le dipendenze - lasciato non configurato
Non è stata scritta alcuna segnalazione apport poiché è stato già raggiunto il valore MaxReport
                                                                                               Non è stata scritta alcuna segnalazione apport poiché è stato già raggiunto il valore MaxReport
             close failed in file object destructor:
Error in sys.excepthook:

Original exception was:
Si sono verificati degli errori nell'elaborazione:
 linux-image-2.6.32-23-generic
 linux-image-generic
 linux-generic
 linux-headers-2.6.32-23-generic
 linux-headers-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: linux-image-2.6.32-23-generic 2.6.32-23.37
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
Architecture: i386
Date: Thu Jun 17 12:04:34 2010
ErrorMessage: run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 2
SourcePackage: nvidia-common
Title: 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

Revision history for this message
Igor Moiseev (moiseev-igor) wrote :
Revision history for this message
Patrick (94bc1052) wrote :

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.

Revision history for this message
pinzia (pinzia) wrote :

same problem on lucid lynx 64 bit
uname -a: Linux xeon 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux

Revision history for this message
pinzia (pinzia) wrote :

# sudo apt-get remove --purge nvidia-common
fix problem for me.
I haven't nvidia card!

Revision history for this message
xylo (stefan-endrullis) wrote :

Thanks for the tip.
aptitude purge nvidia-common
and
aptitude install nvidia-common
fixed the problem for me, too. (I have an nvidia card, but I cannot say whether the second step is really needed.)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

@patrick, the original report is about a problem with debconf not finding its libraries and your issue is something different (looks more like bug 303825 which was fixed) The duplicates are not duplicates.

summary: 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
+ with return code 2 - Can't locate Debconf/Element/Dialog.pm
summary: - 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 - Can't locate Debconf/Element/Dialog.pm
+ /etc/kernel/postinst.d/nvidia-common exited with return code 2 - Can't
+ locate Debconf/Element/Dialog.pm
Changed in nvidia-common (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.