While setting new server and installing php version for some solutions I get: Unable to locate php8.0 on Ubuntu 22.04 server.

E: Unable to locate package php8.0
E: Couldn't find any package by glob 'php8.0'
E: Unable to locate package php8.0-mysql
E: Couldn't find any package by glob 'php8.0-mysql'
E: Unable to locate package php8.0-fpm
E: Couldn't find any package by glob 'php8.0-fpm'
E: Package 'php8.0-common' has no installation candidate
E: Unable to locate package php8.0-bcmath
E: Couldn't find any package by glob 'php8.0-bcmath'
E: Unable to locate package php8.0-gd
E: Couldn't find any package by glob 'php8.0-gd'
E: Unable to locate package php8.0-curl
E: Couldn't find any package by glob 'php8.0-curl'
E: Unable to locate package php8.0-zip
E: Couldn't find any package by glob 'php8.0-zip'
E: Unable to locate package php8.0-xml
E: Couldn't find any package by glob 'php8.0-xml'
E: Unable to locate package php8.0-mbstring
E: Couldn't find any package by glob 'php8.0-mbstring'
E: Unable to locate package php8.0-bz2
E: Couldn't find any package by glob 'php8.0-bz2'
E: Unable to locate package php8.0-intl
E: Couldn't find any package by glob 'php8.0-intl'
E: Unable to locate package php8.0-gmp
E: Couldn't find any package by glob 'php8.0-gmp'

Solution:

Intstall package and get the latest version

sudo add-apt-repository ppa:ondrej/php

Then update system. That’s it.


Reference:

  1. The main PPA for supported PHP versions with many PECL extensions

My site is free of ads and trackers. Was this post helpful to you? Why not BuyMeACoffee