installing new kernels fails: nvidia-common postinst failed

Bug #273681 reported by Andreas Schildbach
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nvidia-common (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: nvidia-common

On a Dell Latitude X1 (containing no nvidia hardware), upgrading intrepid fails at two points (see below).

Removing the nvidia-common scripts provides a workaround for me.

1)

Setting up linux-image-2.6.27-4-generic (2.6.27-4.5) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.27-4-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/nvidia-common
debconf: Unable to load Debconf::Element::Dialog. Failed because: Can't locate Debconf/Element/Dialog.pm in @INC (@INC contains: /etc/perl /usr/local/lib/per
l/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 24) line 2
, <GEN0> line 2.
BEGIN failed--compilation aborted at (eval 24) 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.27-4-generic.postinst line 1002.
dpkg: error processing linux-image-2.6.27-4-generic (--configure):
 subprocess post-installation script returned error exit status 2

---

2)

Setting up linux-headers-2.6.27-4-generic (2.6.27-4.5) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common
debconf: Unable to load Debconf::Element::Dialog. Failed because: Can't locate Debconf/Element/Dialog.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 24) line 2, <GEN0> line 2.
BEGIN failed--compilation aborted at (eval 24) 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.27-4-generic.postinst line 110.
dpkg: error processing linux-headers-2.6.27-4-generic (--configure):
 subprocess 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.27-4-generic; however:
  Package linux-headers-2.6.27-4-generic is not configured yet.
dpkg: error processing linux-headers-generic (--configure):
 dependency problems - leaving unconfigured

Revision history for this message
Alberto Milone (albertomilone) wrote :

Maybe there was a problem with Debconf when you did the dist-upgrade.

Please type:
sudo apt-get install nvidia-common

sudo apt-get install --reinstall linux-headers-2.6.27-4-generic

and let me know what happens.

If nothing happens then the problem is solved.

Revision history for this message
Andreas Schildbach (schildbach) wrote :

First, I tried

  sudo apt-get install -reinstall nvidia-common

but it did not copy the nvidia-common scripts back to

  /etc/kernel/postinst.d
  /etc/kernel/header_postinst.d

Thus, I suppose this test is invalid. What do I need to do to get the scripts back?

Revision history for this message
Joel Cross (ukch) wrote :

I have just had my bug (https://bugs.launchpad.net/bugs/305526) marked a duplicate of this one. For me, the NVidia drivers and nvidia-common are already installed.

Running sudo apt-get install --reinstall linux-{headers,restricted-modules}-`uname -r` did not solve the problem, but just did the same thing it always does when I run apt-get (namely, displays the long error message and quits).

Revision history for this message
Joel Cross (ukch) wrote :

I finally managed to get the problem to go away. I did an 'apt-get purge nvidia-common', then I installed the latest kernel update, and then reinstalled nvidia-common, and everything seems to be fine now.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

See duplicate bug 273681 for data about the same issue but when upgrading kernels (2.6.31-12-generic and others) in Karmic.

summary: - dist-upgrading Intrepid failed because of nvidia-common exiting with
- return code 2
+ installing new kernels fails: nvidia-common postinst failed
Changed in nvidia-common (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastian Malcolm (smalcolm) wrote :

I saw a repeat of this issue after upgrade to lucid and installing recent kernel update to 2.6.32.22.23

On my system I found that jockey-common (0.5.8-0ubuntu8) recommends nvidia-common (0.2.23).
Joel Cross's suggestion (#4) to remove nvidia-common worked for me, so I could then successfully finish installing the newer kernel packages.

Can nvidia-common be safely removed on all 10.04 Lucid Lynx systems?
Replaced by nvidia-current, nvidia-current-modaliases?

Revision history for this message
pinzia (pinzia) wrote :
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.