Ubuntu: Fehler "uninitialized value" bei apt-show-versions - plus Fix

215 Wörter 2 Minuten Lesezeit

Nach einem Update von Ubuntu Linux funktioniert möglicherweise das hilfreiche Skript apt-show-versions nicht mehr und liefert nur eine Vielzahl von Fehler über nicht initialisierte Werte (“Use of uninitialized value”). Hat offensichtlich was mit einem Bug in apt-show-versions und dem angelegten Cache zu tun.

Die Abhilfe ist ziemlich einfach, aber effektiv: das Paket mit dpkg --purge löschen und neu installieren. Dauert 2min und alles funktioniert wieder wie es soll.

apt-show-versions | grep upgrade

Use of uninitialized value $_[0] in hash element at /usr/bin/apt-show-versions line 728.
Use of uninitialized value in string comparison (cmp) at /usr/bin/apt-show-versions line 720.
Use of uninitialized value $archiv in concatenation (.) or string at /usr/bin/apt-show-versions line 315.
Use of uninitialized value $_[0] in hash element at /usr/bin/apt-show-versions line 728.
Use of uninitialized value in string comparison (cmp) at /usr/bin/apt-show-versions line 720.
Use of uninitialized value $archiv in concatenation (.) or string at /usr/bin/apt-show-versions line 315.

dpkg --purge apt-show-versions

Removing apt-show-versions ...
Purging configuration files for apt-show-versions ...

apt-get install apt-show-versions

The following NEW packages will be installed: apt-show-versions
Get:1 http://de.archive.ubuntu.com/ubuntu/ natty/universe apt-show-versions all 0.16 [33.7 kB]
Fetched 33.7 kB in 0s (79.5 kB/s)
Setting up apt-show-versions (0.16) ...
** initializing cache. This may take a while **

apt-show-versions | grep upgrade

Hinweis: dieser Artikel ist ursprünglich auf dem IT-Blog “copy/paste” (www.copypaste.at) erschienen.