Skip to content

Instantly share code, notes, and snippets.

@ajaxray
Last active December 21, 2023 15:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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