0

Upon trying to update using sudo apt update I get

Hit:1 http://gb.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                                                                                                
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease                                                                                                                 
Hit:4 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial InRelease                                                                                  
Ign:5 http://archive.canonical.com/ubuntu trusty InRelease                                                                                                                                                 
Hit:6 http://archive.canonical.com/ubuntu trusty Release                                                                                                                                                   
Hit:7 http://repository.spotify.com stable InRelease                                                                                                                                                       
Hit:8 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease                                                                                                                                    
Get:9 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Ign:11 http://download.ebz.epson.net/dsc/op/stable/debian lsb3.2 InRelease                                           
Hit:12 http://download.ebz.epson.net/dsc/op/stable/debian lsb3.2 Release
Fetched 306 kB in 2s (129 kB/s)                    
Reading package lists... Error!
W: http://download.ebz.epson.net/dsc/op/stable/debian/dists/lsb3.2/Release.gpg: Signature by key E5220FB7014D0FBDA50DFC2BE5E86C008AA65D56 uses weak digest algorithm (SHA1)
E: Read error - read (5: Input/output error)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted

Running this again I get

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

I run sudo dpkg --configure -a and get no errors

Then sudo apt upgrade and it ends with

....
....
Get:91 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 unity-control-center-faces all 15.04.0+16.04.20170214-0ubuntu2 [180 kB]                                                               
Get:92 http://gb.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 va-driver-all amd64 1.7.0-1ubuntu0.1 [4,534 B]                                                                                    
Get:93 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 xul-ext-ubufox all 3.4-0ubuntu0.16.04.2 [3,302 B]                                                                                     
Fetched 255 MB in 19s (12.8 MB/s)                                                                                                                                                                          
Extract templates from packages: 100%
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'libsm6:i386': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

There are some drastic fixes such as this and this but I wouldn't want to attempt deleting system files without further advice.

Jacques MALAPRADE
  • 945
  • 4
  • 17
  • 35

1 Answers1

0

Luckily it wasn't a question of replacing my HD which is what some suggested. The steps to first remove the sudo apt get update error which brings up

E: Read error - read (5: Input/output error)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted

was found here and consists of running

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update

Then to remove the error when running sudo apt-get upgrade which shows

dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'libsm6:i386': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

was to follow the advice here which is to backup the /var/lib/dpkg/status file and edit it to remove the block relating to the libsm6:i386 package. Note there was a block relating to the amd64 version which should not be removed. So

sudo cp /var/lib/dpkg/status{,.backup}
sudo vim /var/lib/dpkg/status

Removing this block

Package: libsm6
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 66
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Multi-Arch: same
Source: libsm
Version: 2:1.2.2-1
Depends: libc6 (>= 2.4), libice6 (>= 1:1.0.0), libuuid1 (>= 2.16)
Pre-Depends: multiarch-support
Description: X11 Session Management library
 This package provides the main interface to the X11 Session Management
 library, which allows for applications to both manage sessions, and make use
 of session managers to save and restore their state for later use.
 .
 More information about X.Org can be found at:
 <URL:http://www.X.org>
 .
 This module can be found at
 git://anongit.freedesktop.org/git/xorg/lib/libSM
 Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>

Saving and rerunning

sudo apt-get -f install
sudo apt-get update 
sudo apt-get upgrade
Jacques MALAPRADE
  • 945
  • 4
  • 17
  • 35