Wednesday, June 3, 2020

Fix apt-get update error on old Debian jessie and wheezy on 2020

I have to install packages on some old Debian jessie and wheezy.
They all have backports packages installed.
Here is my apt configuration files /etc/apt/sources.list for Debian jessie:
deb http://deb.debian.org/debian/ jessie main
deb http://security.debian.org/ jessie/updates main
deb http://archive.debian.org/debian/ jessie-backports main
And Debian wheezy: /etc/apt/sources.list
deb http://archive.debian.org/debian/ wheezy main
deb http://archive.debian.org/debian/ wheezy-backports main
deb http://archive.debian.org/debian-security/ wheezy/updates main
Change the file, then:
apt-get clean all
apt-get update
You may get some error like:
Error 1:
W: GPG error: http://archive.debian.org wheezy Release: The following signatures were invalid: KEYEXPIRED 1587841717 KEYEXPIRED 1557241909 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010
W: GPG error: http://archive.debian.org wheezy-backports Release: The following signatures were invalid: KEYEXPIRED 1587841717 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010
W: GPG error: http://archive.debian.org wheezy/updates Release: The following signatures were invalid: KEYEXPIRED 1587841717 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906
Fix:
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 7638D0442B90D010
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 9D6D8F6BC857C906
Error 2:
E: Release file for http://archive.debian.org/debian-security/dists/wheezy/updates/Release is expired (invalid since 419d 23h 58min 55s). Updates for this repository will not be applied.
Fix:
echo "Acquire::Check-Valid-Until false;" | tee -a /etc/apt/apt.conf.d/10-nocheckvalid
Just keep apt-get clean and apt-get update.
Please left message her if you have any issues that can not be revolved.

1 comment: