Get in touch
or send us a question?
CONTACT

Unable to locate package php7.2 Ubuntu 20.04

We are unable to install the php7.2 and php7.1 version in the ubuntu 20.04. Currently we are using php7.4 and we need the php7.2 also

When we tried to install the php7.2 below commands were not successful in the digital ocean.

downgrade PHP version to 7.2

apt install php7.2

Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package php7.2 E: Couldn’t find any package by glob ‘php7.2’

sudo apt-add-repository ppa:ondrej/php

sudo apt update

sudo apt install -y php7.2 php7.2-cli php7.2-common php7.2-fpm

sudo apt install -y php7.2-mysql php7.2-dom php7.2-simplexml php7.2-ssh2 php7.2-xml php7.2-xmlreader php7.2-curl  php7.2-exif  php7.2-ftp php7.2-gd  php7.2-iconv php7.2-imagick php7.2-json  php7.2-mbstring php7.2-posix php7.2-sockets php7.2-tokenizer

sudo apt install -y php7.2-mysqli php7.2-pdo  php7.2-sqlite3 php7.2-ctype php7.2-fileinfo php7.2-zip php7.2-exif