I followed the steps here https://www.digitalocean.com/community/questions/upgrade-to-latest-php-from-php7-4-nginx-ubuntu-20 as I am on Ubuntu 20 as well but I keep getting the error
sudo apt install php8.3-fpm -y
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package php8.3-fpm
E: Couldn’t find any package by glob ‘php8.3-fpm’
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!
Heya, @b1cfd497da4348d08019b0315db7a0
You get that error because php8.3-fpm is not in the default Ubuntu repos. You only have PHP 7.4 there unless you add a 3rd-party repo (usually Ondřej Surý’s PPA), and even then support for 8.3 on 20.04 may lag.
You’ll need to add Ondřej Surý’s PPA, which is the common way to get PHP 8.x on Ubuntu.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.3
After that you should be able to install and switch between PHP versions.
Hope that this helps!
Hi there,
On Ubuntu 20.04 you won’t see php8.3 in the default repos, so the package errors make sense. PHP 8.x on that release usually comes from Ondrej Sury’s PPA. Without it, apt just won’t know what php8.3-fpm is.
I think the first step is adding the PPA and updating your package list:
sudo add-apt-repository ppa:ondrej/php
sudo apt update
After that you can check what versions are actually available:
apt-cache search php8
I haven’t tested 8.3 specifically on 20.04, but if it’s published in the PPA it should show up there. If it doesn’t, the highest available version may be 8.2 for that Ubuntu release, so maybe worth spinning up a new Droplet with the latest Ubuntu version.
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.