By karthiksts
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
Let us know the solutions for this asap.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello,
I just tested this on a fresh new Ubuntu 20.04 Droplet and I was able to install PHP 7.2 after running the following commands:
sudo apt update
sudo apt-add-repository ppa:ondrej/php
apt update
again:sudo apt update
sudo apt install -y php7.2 php7.2-cli php7.2-common php7.2-fpm
If it still does not work, can you share the output of the following command here:
grep -rn 'ondrej/php' /etc/apt/sources.list /etc/apt/sources.list.d/*
Let me know how it goes! Best, Bobby
It looks like that php7.2-fpm is not available for Ubuntu 20.10
As per the @bobbyiliev suggestion i have created the new droplets and configured ubuntu 21.04 with php7.2 without any issues.
Thanks @bobbyiliev for your support.
same here, please is there a solution for this now ? thanks
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.