phpphp-8.1

Trying to install the phpize extension on the Ubuntu php8.1


I am trying to install the phpize on Ubuntu 20.04 PHP 8.1

I tried following commands but no luck

  1. 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'
  1. 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.
  1. 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'

Solution

  • sudo apt update && sudo apt install -y software-properties-common 
    sudo add-apt-repository ppa:ondrej/php 
    sudo apt update
    

    and then try