Skip to content

Instantly share code, notes, and snippets.

@ajaxray
Last active March 21, 2025 01:55
Show Gist options
  • Save ajaxray/8962697 to your computer and use it in GitHub Desktop.
Save ajaxray/8962697 to your computer and use it in GitHub Desktop.
How to install PHP pecl extensions in Linux and MacOS

Install PHP pecl extensions in Linux and MacOS

Very few easy steps -

  • Download desired package from http://pecl.php.net/packages.php
  • Extract the tar - tar xzf gearman-X.Y.tgz
  • Enter into extracted directory from terminal - cd path/to/gearman-X.Y
  • Run the following commands -
phpize
./configure
make
sudo make install
  • Copy/paste the .so file from your default php extensions folder
  • In php.ini, add extension="gearman.so"
  • Restart Apache

To find out the php extensions folder and php.ini file path, check phpinfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment