Ubuntu 12.04.1 LTS update manager fails - am behind in updates

Asked by robin grediagin on 2012-12-25

Here is what happens when I launch Update Manager:

installArchives() failed:
Extracting templates from packages: 62%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 62%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 62%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 62%%
Extracting templates from packages: 100%%
Preconfiguring packages ...
Setting up apt (0.8.16~exp12ubuntu10.7) ...
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <email address hidden>" not changed
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: invalid size of lockfile `/etc/apt/trusted.gpg.lock'gpg: cannot read lockfile
gpg: can't lock `/etc/apt/trusted.gpg'
gpg: error writing keyring `/etc/apt/trusted.gpg': general error
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <email address hidden>" 15 new signatures
gpg: error reading `[stdin]': general error
gpg: import from `[stdin]' failed: general error
gpg: Total number processed: 1
gpg: unchanged: 1
gpg: new signatures: 15
dpkg: error processing apt (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 apt
Error in function:
Setting up apt (0.8.16~exp12ubuntu10.7) ...
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <email address hidden>" not changed
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: invalid size of lockfile `/etc/apt/trusted.gpg.lock'gpg: cannot read lockfile
gpg: can't lock `/etc/apt/trusted.gpg'
gpg: error writing keyring `/etc/apt/trusted.gpg': general error
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <email address hidden>" 15 new signatures
gpg: error reading `[stdin]': general error
gpg: import from `[stdin]' failed: general error
gpg: Total number processed: 1
gpg: unchanged: 1
gpg: new signatures: 15
dpkg: error processing apt (--configure):
 subprocess installed post-installation script returned error exit status 2

Thank you for your attention

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2012-12-28
Last query:
2012-12-28
Last reply:
2012-12-27

You may have a stale/corrupted lock file /etc/apt/trusted.gpg.lock
Look for that file (might be hidden) and delete it.

robin grediagin (grediagin) said : #2

Found this file but was unable to delete it. right-click on object had 'cut' greyed out, dragged it to trash but it remained in directory. What to do ?

thank you

robin grediagin (grediagin) said : #3

OK - used bash to delete file /etc/apt/trusted.gpg.lock (after reading HELP)

Re-ran Update Manager and got this :

installArchives() failed:
Extracting templates from packages: 57%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 57%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 57%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 57%%
Extracting templates from packages: 100%%
Preconfiguring packages ...
Setting up apt (0.8.16~exp12ubuntu10.7) ...
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <email address hidden>" not changed
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: /etc/apt/trusted.gpg: copy to `/etc/apt/trusted.gpg.tmp' failed: file read error
gpg: error writing keyring `/etc/apt/trusted.gpg': file read error
^[[Agpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <email address hidden>" 15 new signatures
gpg: error reading `[stdin]': file read error
gpg: import from `[stdin]' failed: file read error
gpg: Total number processed: 1
gpg: unchanged: 1
gpg: new signatures: 15

dpkg: error processing apt (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 apt
Error in function:
Setting up apt (0.8.16~exp12ubuntu10.7) ...
^[[Agpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <email address hidden>" not changed
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: /etc/apt/trusted.gpg: copy to `/etc/apt/trusted.gpg.tmp' failed: file read error
gpg: error writing keyring `/etc/apt/trusted.gpg': file read error
gpg: /etc/apt/trusted.gpg: read error: Input/output error
gpg: premature eof while reading hashed signature data
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <email address hidden>" 15 new signatures
gpg: error reading `[stdin]': file read error
gpg: import from `[stdin]' failed: file read error
gpg: Total number processed: 1
gpg: unchanged: 1
gpg: new signatures: 15
dpkg: error processing apt (--configure):
 subprocess installed post-installation script returned error exit status 2

What is the output of:

lsb_release -a; uname -a

Thanks

robin grediagin (grediagin) said : #5

robin@robin-laptop:~$ lsb_release -a
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
robin@robin-laptop:~$ uname -a
Linux robin-laptop 3.2.0-34-generic #53-Ubuntu SMP Thu Nov 15 10:48:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
robin@robin-laptop:~$

thank you for helping me

What is the output of:

ls -la /etc/apt/trusted.gpg

Thanks

robin grediagin (grediagin) said : #7

robin@robin-laptop:~$ ls -la /etc/apt/trusted.gpg
-rw-r--r-- 1 root root 14137 Oct 29 14:05 /etc/apt/trusted.gpg
robin@robin-laptop:~$

cd /etc/apt
sudo rm *.gpg
gpg --export -a 437D05B5 | sudo apt-key add -
sudo apt-get update

Source:
http://techpad.co.uk/content.php?sid=84

robin grediagin (grediagin) said : #9

That was the answer - THANK YOU so much. You folks are the best !

robin grediagin (grediagin) said : #10

Thanks actionparsnip, that solved my question.