4

My PC shuts down while upgrading from 12.04 to 12.10. Everything seems to work but I can't install the missing updates. It always tells me to run apt-get install -f, but when I do so it just says:

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Statusinformationen werden eingelesen... Fertig
Abhängigkeiten werden korrigiert... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  espeak gcc-4.6-base:i386 gir1.2-notify-0.7 libcamel-1.2-29 libebook-1.2-12
  libedataserver-1.2-15 libgconf2-4 libgnome-bluetooth8 libgnome-menu2
  libgnomekbd7 libgomp1:i386 libgweather-3-0 libimobiledevice2 libindicate5
  libkpathsea5 libpoppler19 libusbmuxd1 python-gmenu
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
Die folgenden zusätzlichen Pakete werden installiert:
  nvidia-current-updates xserver-xorg-core xserver-xorg-input-evdev
  xserver-xorg-input-mouse xserver-xorg-input-synaptics
  xserver-xorg-input-vmmouse xserver-xorg-input-wacom
  xserver-xorg-video-cirrus xserver-xorg-video-fbdev xserver-xorg-video-mga
  xserver-xorg-video-neomagic xserver-xorg-video-nouveau
  xserver-xorg-video-openchrome xserver-xorg-video-qxl
  xserver-xorg-video-savage xserver-xorg-video-sis xserver-xorg-video-sisusb
  xserver-xorg-video-tdfx xserver-xorg-video-vesa xserver-xorg-video-vmware
Vorgeschlagene Pakete:
  xfonts-100dpi xfonts-75dpi gpointing-device-settings touchfreeze
  firmware-linux
Die folgenden Pakete werden ENTFERNT:
  nvidia-current
Die folgenden Pakete werden aktualisiert (Upgrade):
  nvidia-current-updates xserver-xorg-core xserver-xorg-input-evdev
  xserver-xorg-input-mouse xserver-xorg-input-synaptics
  xserver-xorg-input-vmmouse xserver-xorg-input-wacom
  xserver-xorg-video-cirrus xserver-xorg-video-fbdev xserver-xorg-video-mga
  xserver-xorg-video-neomagic xserver-xorg-video-nouveau
  xserver-xorg-video-openchrome xserver-xorg-video-qxl
  xserver-xorg-video-savage xserver-xorg-video-sis xserver-xorg-video-sisusb
  xserver-xorg-video-tdfx xserver-xorg-video-vesa xserver-xorg-video-vmware
20 aktualisiert, 0 neu installiert, 1 zu entfernen und 133 nicht aktualisiert.
8 nicht vollständig installiert oder entfernt.
Es müssen noch 0 B von 70,6 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 184 MB Plattenplatz freigegeben.
Möchten Sie fortfahren [J/n]? j
(Lese Datenbank ... 242727 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von nvidia-current ...
Removing all DKMS Modules
Error! There are no instances of module: nvidia-current
295.40 located in the DKMS tree.
Done.
Traceback (most recent call last):
  File "/usr/bin/quirks-handler", line 26, in <module>
    import Quirks.quirkapplier
  File "/usr/lib/python2.7/dist-packages/Quirks/quirkapplier.py", line 26, in <module>
    import XKit.xutils
ImportError: No module named XKit.xutils
dpkg: Fehler beim Bearbeiten von nvidia-current (--remove):
 Unterprozess installiertes pre-removal-Skript gab den Fehlerwert 1 zurück
Trigger für bamfdaemon werden verarbeitet ...
Rebuilding /usr/share/applications/bamf.index...
Trigger für libc-bin werden verarbeitet ...
ldconfig deferred processing now taking place
Fehler traten auf beim Bearbeiten von:
 nvidia-current
E: Sub-process /usr/bin/dpkg returned an error code (1)

When I try to remove nvidia-current it tells me to run apt-get install -f.

Do you guys have any idea? I don't want to reinstall my whole system, takes a lot of time to encrypt everything again and so on.

Zanna
  • 70,465
  • Here's the result of sudo apt-get -f install, do you know what could be a fix to the problem? sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-3.2.0-44-generic linux-headers-3.2.0-44 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up nvidia-current (304.88-0ubuntu0.0.2) ... INFO – Mona Jalal Jun 14 '13 at 01:12

2 Answers2

3

I had the same problem. Looks like /usr/lib/python2.7/dist-packages/Quirks/quirkapplier.py reference xkit.xutils with this syntax : XKit.xutils (upper case at the begining)

I give a try to change it for a lower case syntax as I found some other references in other libraries with this syntax.

Braiam
  • 67,791
  • 32
  • 179
  • 269
-1

Try running:

sudo apt-get update -f
sudo apt-get -f install

If its not working install aptitude:

sudo apt-get install aptitude 

and run

sudo apt-get safe-upgrade.

There is a solution of fixing broken packages here: trying to overwrite '/usr/bin/opencv_haartraining', which is also in package libopencv2.3-bin 2.3.1+svn6514+branch23-12~oneiric

sudo dpkg --configure -a
sudo apt-get install -f

If the problem of a broken package still exist the solution is to edit the dpkg status file manually.

sudo -H gedit /var/lib/dpkg/status  #you can use vi or nano instead of gedit

Locate the corrupt package, and remove the whole block of information about it and save the file. I would personally recommend to everyone do fresh install instead of upgrading and make dedicated home folder so you will not lose any information when reinstalling ubuntu. I had a bad experience upgrading to new release... My notebook shut down during the process and there were errors simular to yours.

Zanna
  • 70,465