0

The Software Updater warns me about some updates available, but when I click "Install" it fails... What's going on?

If I run it from the terminal and that's what I see:

Start from terminal

After clicking "Install"

What I can do to solve this problem?

Honestly, few minutes before I was trying to install Openscad so I've added the proper PPA. But it won't install so I've removed it using the "Software & Updates" program. Now I have this new problem...

After running the command sudo apt update && sudo apt upgrade, this is what I see:

Hit:1 htp://de.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 htp://archive.canonical.com/ubuntu xenial InRelease                                       
Hit:3 htp://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease                           
Hit:4 htp://de.archive.ubuntu.com/ubuntu xenial-updates InRelease                                   
Hit:5 htp://de.archive.ubuntu.com/ubuntu xenial-backports InRelease                                 
Get:6 htp://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]
Fetched 94,5 kB in 0s (110 kB/s)                               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
33 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
kde-l10n-engb linux-headers-4.4.0-28 linux-headers-4.4.0-28-generic linux-image-4.4.0-28-generic
linux-image-extra-4.4.0-28-generic python-exif
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
compiz compiz-core compiz-gnome compiz-plugins-default eog gnupg gpgv libcompizconfig0 libdecoration0 libframe6
libgcrypt20 libgcrypt20:i386 libharfbuzz-icu0 libharfbuzz0b libidn11 libidn11:i386 libpoppler-glib8
libpoppler-qt5-1 libpoppler58 libssl1.0.0 libssl1.0.0:i386 openssl poppler-utils python3-distupgrade
python3-software-properties snap-confine snapd software-properties-common software-properties-gtk
ubuntu-core-launcher ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk vino
33 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/12,5 MB of archives.
After this operation, 466 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
files list file for package 'tzdata' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)*
George Udosen
  • 36,677
gimpo
  • 41
  • Can you do sudo apt update && sudo apt upgrade in the terminal and tell us the output you see? – edwinksl Aug 24 '16 at 19:56
  • @edwinksl giulio@giulio-desktop:~$ sudo apt update && sudo apt upgrade . .

    After this operation, 466 kB of additional disk space will be used. Do you want to continue? [Y/n] Extracting templates from packages: 100% Preconfiguring packages ... dpkg: unrecoverable fatal error, aborting: files list file for package 'tzdata' contains empty filename E: Sub-process /usr/bin/dpkg returned an error code (2)

    – gimpo Aug 24 '16 at 20:04
  • Put that into your question; it is hard to read terminal outputs in comments. – edwinksl Aug 24 '16 at 20:06
  • @edwinksl: I saw the same message ("tzdata....") briefly in the Updater window when I click on "details". – gimpo Aug 24 '16 at 20:07
  • @edwinksl: by running the apt-autoremove command I receive the same error: files list file for package 'tzdata' contains empty filename – gimpo Aug 24 '16 at 20:29

1 Answers1

1

SOLVED!

I have to thanks the answer found here that addressed me to solution published here by the user gartss (scroll down the page)

It is definitely a problem related to hard disk errors and/or bad sectors. In fact, by inspecting the directory /var/lib/dpkg/status/info (containing the list of files for every installed package) I've found two files containing unreadable characters even if they should be simple plain text files.

The chronology of what I've done:

  1. run fdisk to check/fix errors

    • restart Ubuntu from live CD
    • run Terminal command line
    • got the list of disks by issuing the command sudo fdisk -l
    • run the disk check on all partitions but the boot: fsck /dev/sdaX
      (In my case X = 2 or 5 or 6)
    • answered "Yes" to all corrections proposed by fsck.
    • shutdown the PC and restarted normally (i.e. without the live CD)
  2. opened the status file used by dkpg with gedit as superuser: gksudo gedit /var/lib/dpkg/status

  3. saved a backup copy in the same directory (i.e. status-bkp)
  4. searching the name of the offending package tzdata
  5. deleted all the lines related to the package and saved the modified file (see below what I've deleted)
  6. issued the command sudo dpkg dpkg --configure -a
  7. issued the command sudo apt-get -f install
    (This reinstall the deleted package and adjust. all the broken dependencies)
  8. tried to start the Updated Manager to check if all was finally fine: sudo update manager
  9. after clicking "install" I've got a new error (wow!) for another damaged package, in my case:
    files list file for package libnss3-nssdb is missing final newline
  10. opened again the status file like at step (2), deleted the offending package and saved it again (see below what I've deleted)
  11. issued again the command sudo dpkg dpkg --configure -a
  12. issued again the command sudo apt-get -f install
  13. run again the Update Manager: sudo update manager
  14. and............ all has gone fine!
    Now the update manager works again as before: System updated

Hope this helps!

Deleted lines (in my case) at step 2:

Package: tzdata
Status: install ok installed
Priority: required
Section: localization
Installed-Size: 2769
Maintainer: Ubuntu Developers 
Architecture: all
Multi-Arch: foreign
Version: 2016f-0ubuntu0.16.04
Replaces: libc0.1, libc0.3, libc6, libc6.1
Provides: tzdata-stretch
Depends: debconf (>= 0.5) | debconf-2.0
Description: time zone and daylight-saving time data
 This package contains data required for the implementation of
 standard local time for many representative locations around the
 globe. It is updated periodically to reflect changes made by
 political bodies to time zone boundaries, UTC offsets, and
 daylight-saving rules.
Homepage: http://www.iana.org/time-zones
Original-Maintainer: GNU Libc Maintainers 

Deleted lines (in my case) at step 10:

Package: libnss3-nssdb
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 86
Maintainer: Ubuntu Developers 
Architecture: all
Multi-Arch: foreign
Source: nss
Version: 2:3.23-0ubuntu0.16.04.1
Depends: libnss3 (= 2:3.23-0ubuntu0.16.04.1)
Description: Network Security Security libraries - shared databases
 This package includes shared certificate and key databases.
Homepage: http://www.mozilla.org/projects/security/pki/nss/
Original-Maintainer: Maintainers of Mozilla-related packages 
gimpo
  • 41