John Davidson

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

0 comments
Message:


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'


My Answer:
It seems like the php8.1-dev package is not available in the default Ubuntu repositories. You may need to add a PPA (Personal Package Archive) that provides the php8.1-dev package.

You can try adding the ondrej/php PPA which provides updated PHP packages for Ubuntu. Here's how you can add the PPA and install the php8.1-dev package:

1. Add the ondrej/php PPA:

sudo add-apt-repository ppa:ondrej/php


2. Update the package list:

sudo apt-get update


3. Install the php8.1-dev package:

sudo apt-get install php8.1-dev


After installing the php8.1-dev package, you should be able to use phpize for compiling PHP extensions.

Rate this post

5 of 5 based on 6358 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us