I used this code (found on the forum):
Code: Select all
apt -y install apt-transport-https ca-certificates
wget -nv -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
apt update
apt upgrade -y
apt -y install php7.4-mbstring php7.4-bcmath php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-intl php7.4-mysql php7.4-soap php7.4-xml php7.4-zip php7.4-memcache php7.4-memcached php7.4-common php7.4-opcache php7.4-readline
Code: Select all
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.4-cli : Depends: libargon2-1 (>= 0~20171227) but it is not going to be installed
Depends: libc6 (>= 2.27) but 2.24-11+deb9u4 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.4-common : Depends: libc6 (>= 2.27) but 2.24-11+deb9u4 is to be installed
Breaks: php7.0-curl (< 7.0.33-1~) but 7.0.33-0+deb9u12 is to be installed
php7.4-curl : Depends: libcurl4 (>= 7.56.1) but it is not installable
Breaks: php7.0-curl (< 7.0.33-1~) but 7.0.33-0+deb9u12 is to be installed
php7.4-fpm : Depends: libargon2-1 (>= 0~20171227) but it is not going to be installed
Depends: libc6 (>= 2.27) but 2.24-11+deb9u4 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.4-mbstring : Depends: libonig5 (>= 6.8.1) but it is not installable
php7.4-memcache : Depends: libc6 (>= 2.25) but 2.24-11+deb9u4 is to be installed
php7.4-memcached : Depends: libsasl2-2 (>= 2.1.27+dfsg) but 2.1.27~101-g0780600+dfsg-3+deb9u1 is to be installed
php7.4-opcache : Depends: libc6 (>= 2.27) but 2.24-11+deb9u4 is to be installed
php7.4-readline : Depends: libncurses6 (>= 6) but it is not installable
Depends: libtinfo6 (>= 6) but it is not installable
php7.4-zip : Depends: libc6 (>= 2.27) but 2.24-11+deb9u4 is to be installed
E: Unable to correct problems, you have held broken packages.
Edit:
Did following and 7.4 is installed::
Code: Select all
sudo apt install apt-transport-https lsb-release ca-certificates curl -y
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
sudo apt install php7.4-curl php7.4-mbstring php7.4-bz2 php7.4-readline php7.4-intl php7.4-bcmath php7.4-bz2 php7.4-cgi php7.4-cli php7.4-curl php7.4-common php7.4-gd php7.4-intl php7.4-json php7.4-mbstring php7.4-mcrypt php7.4-mysql php7.4-opcache php7.4-pspell php7.4-readline php7.4-xml php7.4-zip
sudo apt install php7.4-bcmath php7.4-bz2 php7.4-curl php7.4-intl php7.4-mbstring php7.4-mysql php7.4-readline php7.4-xml php7.4-zip