Ubuntu PHP bz2 Extension Install Commands Example

By Hardik Savani November 5, 2023 Category : Ubuntu

Hey Developer,

This example is focused on how to install php bz2 extension in ubuntu. you will learn ubuntu php install bz2 extension. This article will give you a simple example of install php bz2 extension ubuntu 20.04. This tutorial will give you a simple example of install php bz2 extension ubuntu. Let's see below example ubuntu install php bz2 extension.

We can install php bz2 extension using php-bz2 library. i will give you following list of commands to install php bz2 extension in ubuntu 22.10, ubuntu 22.04, ubuntu 21.10, ubuntu 21.04, ubuntu 20.04, ubuntu 18.04 and ubuntu 16.04 server.

Update Ubuntu Package:

You need to run both commands one by one:

sudo add-apt-repository ppa:ondrej/php

sudo apt update

Install php-bz2 Extension:

Solution:

You need to run both commands one by one:

sudo apt-get install php-bz2

Solution for PHP 8.2

You need to run both command one by one:

sudo apt-get install php8.2-bz2

Solution for PHP 8.1

You need to run both command one by one:

sudo apt-get install php8.1-bz2

Solution for PHP 8.0

You need to run both command one by one:

sudo apt-get install php8.0-bz2

Solution for PHP 7.4

You need to run both command one by one:

sudo apt-get install php7.4-bz2

Solution for PHP 7.3

You need to run both command one by one:

sudo apt-get install php7.3-bz2

Solution for PHP 7.2

You need to run both command one by one:

sudo apt-get install php7.2-bz2

Restart Apache Server:

Now, restart apache2 server using following command:

sudo service apache2 restart

Check php-bz2 Extension Installed:

Here, we will run following command to check extension is installed or not:

php -m | grep -i bz2

Output:

I hope it can help you...

Tags :
Shares