All we need is an easy explanation of the problem, so here it is.
Debian 10 is somehow completely broken apt-get update / upgrade does not work the ca-certificates do not work I try to fix it for too long now but nothing works. that’s why I hope someone can help me here. I’m new to Linux Debian and don’t know exactly what I did ._. Thank you already 😀
apt-get update
Err:2 https://packages.sury.org/php buster Release
Certificate verification failed: The certificate is NOT trusted. The certifica te issuer is unknown. Could not handshake: Error in the certificate verificatio n. [IP: 172.67.182.150 443]
Reading package lists... Done
W: https://packages.sury.org/php/dists/buster/InRelease: No system certificates available. Try installing ca-certificates.
W: https://packages.sury.org/php/dists/buster/Release: No system certificates av ailable. Try installing ca-certificates.
E: The repository 'https://packages.sury.org/php buster Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disa bled by default.
N: See apt-secure(8) manpage for repository creation and user configuration deta ```
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
Method 1
The problem is not with Debian. It’s with https://packages.sury.org/php
. That’s a 3rd party repository.
First, ensure that your buster
installation (without the PHP stuff) is good and will handle certificates:
sudo mv /etc/apt/sources.list.d/php.list{,.bak}
sudo apt update
sudo apt install apt-transport-https ca-certificates curl
Next, if (and only if) you trust the source, then restore php.list
and get the latest signature:
sudo mv /etc/apt/source.list.d/php.list{.bak,}
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo apt update
Edit: It sounds like you’ve lost your main Debian archive source. re-create it with:
echo "deb http://ftp.debian.org/debian/ buster main" | sudo tee -a /etc/apt/sources.list
then try again
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0