apt-update GPG error issues

fotisevangelou

Renowned Member
Jan 20, 2016
17
0
66
Athens, Greece
Yesterday I went into Proxmox to update the system and got these errors:

Code:
Ign:1 http://ftp.debian.org/debian stretch InRelease
Get:2 http://ftp.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:3 http://security.debian.org stretch/updates InRelease [94.3 kB]
Ign:3 http://security.debian.org stretch/updates InRelease
Ign:2 http://ftp.debian.org/debian stretch-updates InRelease
Get:4 http://ftp.debian.org/debian stretch Release [118 kB]
Get:5 http://download.proxmox.com/debian/pve stretch InRelease [3,052 B]
Ign:5 http://download.proxmox.com/debian/pve stretch InRelease
Get:6 http://ftp.debian.org/debian stretch Release.gpg [2,434 B]
Ign:6 http://ftp.debian.org/debian stretch Release.gpg
Hit:7 http://ftp.debian.org/debian stretch/main amd64 Packages
Hit:8 http://ftp.debian.org/debian stretch/main Translation-en
Hit:9 http://ftp.debian.org/debian stretch/contrib amd64 Packages
Ign:7 http://ftp.debian.org/debian stretch/main amd64 Packages
Ign:8 http://ftp.debian.org/debian stretch/main Translation-en
Ign:9 http://ftp.debian.org/debian stretch/contrib amd64 Packages
Hit:10 http://ftp.debian.org/debian stretch/contrib Translation-en
Ign:10 http://ftp.debian.org/debian stretch/contrib Translation-en
Hit:7 http://ftp.debian.org/debian stretch/main amd64 Packages
Hit:8 http://ftp.debian.org/debian stretch/main Translation-en
Ign:7 http://ftp.debian.org/debian stretch/main amd64 Packages
Ign:8 http://ftp.debian.org/debian stretch/main Translation-en
Hit:9 http://ftp.debian.org/debian stretch/contrib amd64 Packages
Ign:9 http://ftp.debian.org/debian stretch/contrib amd64 Packages
Hit:10 http://ftp.debian.org/debian stretch/contrib Translation-en
Ign:10 http://ftp.debian.org/debian stretch/contrib Translation-en
Ign:7 http://ftp.debian.org/debian stretch/main amd64 Packages
Err:8 http://ftp.debian.org/debian stretch/main Translation-en
  BZ2_bzread: /var/lib/apt/lists/partial/ftp.debian.org_debian_dists_stretch_main_i18n_Translation-en.bz2 Read error (-5: DATA_ERROR_MAGIC)
Hit:9 http://ftp.debian.org/debian stretch/contrib amd64 Packages
Ign:10 http://ftp.debian.org/debian stretch/contrib Translation-en
Ign:7 http://ftp.debian.org/debian stretch/main amd64 Packages
Fetched 309 kB in 1s (206 kB/s)
Reading package lists... Done
W: GPG error: http://security.debian.org stretch/updates InRelease: Couldn't create temporary file /tmp/apt.conf.dEmiPR for passing config to apt-key
W: The repository 'http://security.debian.org stretch/updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ftp.debian.org/debian stretch-updates InRelease: Couldn't create temporary file /tmp/apt.conf.Kpd6dQ for passing config to apt-key
W: The repository 'http://ftp.debian.org/debian stretch-updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://download.proxmox.com/debian/pve stretch InRelease: Couldn't create temporary file /tmp/apt.conf.vdgWDQ for passing config to apt-key
W: The repository 'http://download.proxmox.com/debian/pve stretch InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ftp.debian.org/debian stretch Release: Couldn't create temporary file /tmp/apt.conf.Gb3lxQ for passing config to apt-key
W: The repository 'http://ftp.debian.org/debian stretch Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ftp.debian.org/debian/dists/stretch/main/i18n/Translation-en  BZ2_bzread: /var/lib/apt/lists/partial/ftp.debian.org_debian_dists_stretch_main_i18n_Translation-en.bz2 Read error (-5: DATA_ERROR_MAGIC)
E: Some index files failed to download. They have been ignored, or old ones used instead.

There is not much I could find online so I thought perhaps this is related to the Proxmox Debian build somehow.

The only solution mentioned online is to empty the contents of /var/lib/apt/lists/ but there was no change. The /tmp folder is also writable.

These is my /etc/apt/sources.list file:
Code:
deb http://ftp.debian.org/debian stretch main contrib

deb http://ftp.debian.org/debian stretch-updates main contrib

# security updates
deb http://security.debian.org stretch/updates main contrib

# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve stretch pve-no-subscription

Any ideas?
 
hmm - sorry I overread that!
maybe the output of `strace -f apt-get update` could shed some light?
 
I would search for the output of the errors (`Couldn't create temporary file /tmp/apt.conf.`) and read the surrounding lines (esp. looking for lines ending in an errno (e.g. EPERM for permission denied).
 
I have exactly the same error. /tmp is writeable too, if you test with e.g. touch /tmp/foo

However I did notice that /tmp doesn't have what I'd normally consider to be the correct permissions (1777) for a Linux /tmp directory:

Code:
root@hostname:/# ls -la / | grep tmp
drwx------   8 root root   13 Oct 24 10:37 tmp

chmod 1777 /tmp seemed to fix the issue.

This is a fairly recent install of PVE, but I'm not sure whether /tmp permissions were correct out of the box or changed at a later date. It may also be noteworthy that / (and therefore /tmp) is a ZFS filesystem:

Code:
root@hostname:/# zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
rpool                   9.84G   259G   104K  /rpool
rpool/ROOT              1.33G   259G    96K  /rpool/ROOT
rpool/ROOT/pve-1        1.33G   259G  1.33G  /
rpool/data                96K   259G    96K  /rpool/data
rpool/swap              8.50G   268G    56K  -
vmdata                  39.7G  4.68T   104K  /vmdata
 
Thanks for the update and digging into this - did you setup PVE via the installer (and which iso did you use) or by installing the packages on top of a debian install?
 
I used the installer. I think (but not 100% sure) it was proxmox-ve_5.2-1.iso.

I'm supposed to be rebuilding another host in coming weeks; if I remember I'll see what the initial permissions are when I do that (though it'll be on ext4 rather than ZFS).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!