Skip to content

Instantly share code, notes, and snippets.

@tokoiwesley
Last active June 19, 2024 01:03
Show Gist options
  • Save tokoiwesley/06f6f74b23a5dac6e25f079ee7604349 to your computer and use it in GitHub Desktop.
Save tokoiwesley/06f6f74b23a5dac6e25f079ee7604349 to your computer and use it in GitHub Desktop.
How To Install Php 7.1 On Debian
# Add Repository to your system (ondrej/php PPA)
sudo apt install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update
# Install PHP 7.1
sudo apt install php7.1
# Install additional packages as per your project
sudo apt install php7.1-gd php7.1-mbstring php7.1-xml php7.1-cli php7.1-json
Copy link

ghost commented Jul 13, 2018

Ign:1 http://ftp.br.debian.org/debian stretch InRelease
Ign:2 https://packages.sury.org/php stretch InRelease
Hit:3 http://ftp.br.debian.org/debian stretch-updates InRelease
Err:4 https://packages.sury.org/php stretch Release
  Received HTTP code 503 from proxy after CONNECT
Hit:5 http://ftp.br.debian.org/debian stretch Release                    
Hit:7 http://security.debian.org stretch/updates InRelease               
Reading package lists... Done
E: The repository 'https://packages.sury.org/php stretch Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Any solution for this ?

@robwilde
Copy link

Ya I am seeing similar issue in Docker image build.

@dunmaksim
Copy link

Packages for Debian Stretch are deleted from the Sury repository.

@vzool
Copy link

vzool commented Apr 24, 2024

It worked with Debian 12 (Bookworm), Thanks for sharing! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment