Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Ran an apt-get update and apt-get upgrade today on Ubuntu 12.04. And the process has become stuck trying to upgrade the apt package. It appears the post install script for apt is broken. And I can't roll it back to a previous version as it keeps trying to dpkg --configure the latest version on every apt-get run.

This is the output I get when the run fails:

Setting up apt (0.8.16~exp12ubuntu10.11) ...
gpg: keyblock resource `/home/chris/.gnupg/Not': file open error
gpg: keyblock resource `/home/chris/.gnupg/a': file open error
gpg: keyblock resource `/home/chris/.gnupg/directory:': file open error
gpg: keyblock resource `/home/chris/.gnupg/--list': file open error
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" not changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>" not changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
dpkg: error processing apt (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 apt
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT: Out of sudo gpg --list-keys as requested:

chris@www0:~$ sudo gpg --list-keys
chris@www0:~$

The issue seems to lie in the apt postinst script. It calls apt-key update which seems to fail and provide the output as above

sudo apt-key update
gpg: keyblock resource `/home/chris/.gnupg/Not': file open error
gpg: keyblock resource `/home/chris/.gnupg/a': file open error
gpg: keyblock resource `/home/chris/.gnupg/directory:': file open error
gpg: keyblock resource `/home/chris/.gnupg/--list': file open error
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" not changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>" not changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" not changed
gpg: Total number processed: 4
gpg:              unchanged: 4sudo apt-key update
gpg: keyblock resource `/home/chris/.gnupg/Not': file open error
gpg: keyblock resource `/home/chris/.gnupg/a': file open error
gpg: keyblock resource `/home/chris/.gnupg/directory:': file open error
gpg: keyblock resource `/home/chris/.gnupg/--list': file open error
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" not changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>" not changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
share|improve this question
    
Can you please post the exact commands you run? And why is it looking for GPG keys in your $HOME directory? did you run the commands as your user (using sudo) or as root ? –  dawud Jul 16 '13 at 18:11
    
The exact commands are: sudo apt-get update sudo apt-get upgrade I have no idea why it's looking for gpg keys in home. It just is as part of the upgrade. –  cduffin Jul 17 '13 at 8:28
    
OK, try cleaning first: apt-get clean && apt-get update && apt-get upgrade –  dawud Jul 17 '13 at 8:31
    
Nope, still gives the same error unfortunately. –  cduffin Jul 17 '13 at 8:51
    
Can you add to your Q the output of sudo gpg --list-keys? –  dawud Jul 17 '13 at 8:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.