Cannot Connect to Surry to get Php8

My system is Debian Buster:

~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

I have run the following commands attempting to install Php 8.0

sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo apt update && sudo apt upgrade -y 
sudo reboot
sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt -y install php8.0

apt update then spits out the following error, which leads to php8.0 not being an existing package:

Resolving packages.sury.org (packages.sury.org)... 172.67.182.150, 104.21.18.148, 2606:4700:3030::ac43:b696, ...
Connecting to packages.sury.org (packages.sury.org)|172.67.182.150|:443... connected.
GnuTLS: A TLS fatal alert has been received.
GnuTLS: received alert [49]: Access was denied
Unable to establish SSL connection.

I know this is not a networking issue because I can ping 'google.com' and 8.8.8.8 along with downloading packages from other third parties. I cannot seem to figure out how to get this work, I would be open to alternatives to Sury to get Php 8.0 installed. Is this my issue or an issue with Sury? Nevertheless, Sury seems to be the best way to get Php 8.0.

Hopefully, someone way smarter than me knows why this is not working. If you have any further questions you can comment or private message me. Thank you in advance!


Solution 1:

You have a typo in the first command and the last command (nothing will be installed):

sudo apt -y install lsb-release apt-transport-https ca-certificates 

and sudo apt -y install php8.0

The -y should be after install.

To install the required package, use:

sudo apt install -y lsb-release apt-transport-https ca-certificates 

next:

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt install -y php8.0