Updating apt packages when root certificates are expired
When you left a computer unplugged for too long, some things start to break. Certificates are one of them. Since all certificates come with an expiration date, leaving a computer off of internet for too long makes them obsolote. You may get errors like
$ sudo apt install --reinstall ca-certificates
Err:1 https://mirror.serverius.net/raspbian/raspbian buster/main armhf ca-certificates all 20200601~deb10u2
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 91.221.69.39 443]
E: Failed to fetch https://mirror.serverius.net/raspbian/raspbian/pool/main/c/ca-certificates/ca-certificates_20200601~deb10u2_all.deb Certificate verification failed: The certificate is NOT trusted. The certifica
te chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 91.221.69.39 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Luckily, there is a very simple way to resolve this.
sudo apt -o "Acquire::https::Verify-Peer=false" update
sudo apt -o "Acquire::https::Verify-Peer=false" upgrade
Source: forums.raspberrypi.com
Comments