I am trying to install the phpize on Ubuntu 20.04 PHP 8.1
I tried following commands but no luck
sudo apt-get install php8.0-dev
E: Unable to locate package php8.0-dev
E: Couldn't find any package by glob 'php8.0-dev'
E: Couldn't find any package by regex 'php8.0-dev'
sudo apt-get install php-dev
php-dev : Depends: php7.4-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install php8.1-dev
E: Couldn't find any package by glob 'php8.1-dev'
E: Couldn't find any package by regex 'php8.1-dev'
2
Answers
and then try
You might find the following also appropriate:
Source: https://packages.sury.org/php/README.txt
For example, a Dockerfile:
Just in case, currently, the main difference between relatively common Debian and Alpine Linux PHP extension installations is that the latter builds extensions (i.e. make, docker-php-extension-installer) and the former – uses pre-compiled binaries (e.g. Bullseye/amd64).
Alpine versions are currently mostly used in the official PHP Docker registry, yet the above PPA for PHP (5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1) (ppa:ondrej/php) mostly by Ondřej Surý is quite known and trusted.
Source: https://deb.sury.org