package linux-image-2.6.28-8-generic 2.6.28-8.24 failed to install/upgrade: subprocess post-installation script returned error exit status 2 (ImportError: No module named NvidiaDetector)

Bug #331675 reported by Shadow on 2009-02-19
316
This bug affects 36 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
nvidia-common (Ubuntu)
Undecided
Unassigned

Bug Description

The update did not install properly which cause this crash.

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess post-installation script returned error exit status 2
Lsusb:
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Package: linux-image-2.6.28-8-generic 2.6.28-8.24
ProcCmdLine: User Name=UUID=912d04b0-77a4-4248-b6fc-3bbeb95e317d ro quiet splash
ProcVersionSignature: Ubuntu 2.6.28-8.24-generic
SourcePackage: linux
Title: package linux-image-2.6.28-8-generic 2.6.28-8.24 failed to install/upgrade: subprocess post-installation script returned error exit status 2

Shadow (nathangrave3000) wrote :
Dave Gilbert (ubuntu-treblig) wrote :

Log errors seem to show the bit which fell over is:

update-initramfs: Generating /boot/initrd.img-2.6.28-4-generic

Errors were encountered while processing:

 nvidia-common

Log ended: 2009-02-19 01:00:40

Log started: 2009-02-19 01:01:30
Setting up nvidia-common (0.2.7) ...

Traceback (most recent call last):

  File "/usr/bin/nvidia-detector", line 2, in <module>

    import NvidiaDetector

ImportError: No module named NvidiaDetector

Error in sys.excepthook:

Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 85, in apport_excepthook

    os.O_WRONLY|os.O_CREAT|os.O_EXCL), 'w')

OSError: [Errno 17] File exists: '/var/crash/_usr_bin_nvidia-detector.0.crash'

Original exception was:

Traceback (most recent call last):

  File "/usr/bin/nvidia-detector", line 2, in <module>

    import NvidiaDetector

ImportError: No module named NvidiaDetector

dpkg: error processing nvidia-common (--configure):

 subprocess post-installation script returned error exit status 1

Errors were encountered while processing:

 nvidia-common

Log ended: 2009-02-19 01:01:31

michael37 (misha37) wrote :

Same problem. BTW, I do not have an Nvidia graphics card.

Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms
 * Running DKMS auto installation service for kernel 2.6.28-8-generic
 * fglrx (8.543)... fglrx (8.543): Already installed on this kernel.
                                                                                                                            [ OK ]
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common
Traceback (most recent call last):
  File "/usr/bin/nvidia-detector", line 2, in <module>
    import NvidiaDetector
ImportError: No module named NvidiaDetector
run-parts: /etc/kernel/header_postinst.d/nvidia-common exited with return code 1
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-2.6.28-8-generic.postinst line 110.
dpkg: error processing linux-headers-2.6.28-8-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.28-8-generic; however:
  Package linux-headers-2.6.28-8-generic is not configured yet.
dpkg: error processing linux-headers-generic (--configure):
 dependency problems - leaving unconfigured
were encountered while processing:
 linux-image-2.6.28-8-generic
 linux-restricted-modules-2.6.28-8-generic
 linux-image-generic
 linux-restricted-modules-generic
 linux-generic
 linux-image
 linux-headers-2.6.28-8-generic
 linux-headers-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi Guys,

This looks similar, if not a duplicate of bug 303825 . bug 303825 seemed to be resolved by either reinstalling nvidia-common or removing the package completely. Care to comment if either resolve the issue reported here? For now I'm closing the "linux (Ubuntu)" task and keeping the "nvidia-common (Ubuntu)" task open. Thanks.

Changed in linux (Ubuntu):
status: New → Invalid
Sebastian (seb19) wrote :

Same as michael37

Christophe Dumez (hydr0g3n) wrote :

I have exactly the same problem:

Setting up nvidia-common (0.2.4.1) ...
Traceback (most recent call last):
  File "/usr/bin/nvidia-detector", line 2, in <module>
    import NvidiaDetector
ImportError: No module named NvidiaDetector
dpkg: error processing nvidia-common (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 nvidia-common

My system is up to date. Reinstalling the package did not change anything for me.

Andrew (andrew-rw-robinson) wrote :

Workaround:

(cd /usr/bin/; sudo mv nvidia-detector nvidia-detector2)

Then finish installing nvidia-common

(cd /usr/bin/; sudo mv nvidia-detector2 nvidia-detector)

Should work. The problem looks like that it tries to execute the python script before the python libraries are installed!

Paolo Donadeo (paolo.donadeo) wrote :

I confirm that the workaround suggested by Andrew worked for me.

h2g2bob (d-j-batley) wrote :

Confirming.

Changed in nvidia-common (Ubuntu):
status: New → Confirmed

I did not understand the questions put to me by the Apport application. Is this (2.6.32-11-generic-pae) the upstream kernel? I have no idea. I was installing source and headers for that kernel because the Nvidia driver installer (the OEM's; I have no patience and insufficient wisdom to ken the distro's) asked for them.

summary: package linux-image-2.6.28-8-generic 2.6.28-8.24 failed to
install/upgrade: subprocess post-installation script returned error exit
- status 2
+ status 2 (ImportError: No module named NvidiaDetector)
ofer shaham (ofer-shaham) wrote :

I confirm that the workaround suggested by Andrew worked for me.

To post a comment you must log in.