Install PHP 7.x on Debian 9, Debian 10 with Sury Package

Install Required Libraries

apt-get install gnupg2

This for adding pgp of sury packages repository, then add packages to /etc/apt/sources.list.d/

wget -qO – | sudo apt-key add –

Install https transport to enable apt with https method

apt-get install apt-transport-https

if not install this, you will get error message: “E: The method driver /usr/lib/apt/methods/https could not be found.”
then update your aptitude repository

apt-get update

${SUDO} apt-get -y install apt-transport-https lsb-release ca-certificates curl
${SUDO} wget -O /etc/apt/trusted.gpg.d/php.gpg
${SUDO} sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
${SUDO} apt-get update

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.