sajad torkamani

What is PECL?

PECL (PHP Extension Community Library) is the repository for PHP extensions that are written in C. You can browse PECL extensions on its website.

How to install PECL extensions on Ubuntu

On Ubuntu, you’ll typically install them using apt. For example the zip extension can be installed by installing the php8.0-zip package:

sudo apt-get install php8.0-zip

How to install PECL extensions on macOS

On macOS, you can use the pecl command-line utility that’s included when you install PHP with Homebrew. pecl uses the PEAR package manager under the hood so you can install extensions with something like:

pecl install imagick

Refer to the PEAR manual for more info on how to use pecl.

An example PECL extension: zip

Here’s the package information for the zip extension. On the package page, you’ll see a Browse Source link that’ll take you to the GitHub repo.

Sources

Tagged: PHP

Leave a comment

Your email address will not be published. Required fields are marked *