Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install PECL on Mac OS X 10.6

Is there any way to install PHP:s PECL handler on Mac OS X 10.6, to be used with the bundled PHP?

like image 300
Manne W Avatar asked Apr 04 '11 08:04

Manne W


People also ask

What is PECL command?

The pecl command is used to install PECL extensions. The peardev command is a wrapper for the pear command which removes the normal configured memory limit.

What is PECL in Linux?

PECL (PHP Extension Community Library) is a spin-off of PEAR, and is primarily used to house groups of functions that are no longer bundled with the default installation of PHP. As of PHP 5, these extensions can be downloaded and installed separately from the regular PHP download.


2 Answers

Better late than never, but if you are like me and installed PHP directly from php.net (instead of using something like Homebrew or Port, then you can simply follow the following link to install Pear and PECL:

http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/

We need PEAR! For some reason, it's not set up ready to on Lion, but the install phar file is here, so we just need to run it.

cd /usr/lib/php sudo php install-pear-nozlib.phar  Edit: /etc/php.ini and find the line: ;   include_path = ".:/php/includes"  and change it to:   include_path = ".:/usr/lib/php/pear" sudo pear channel-update pear.php.net sudo pecl channel-update pecl.php.net sudo pear upgrade-all 

It worked fine for me.

like image 145
numberwhun Avatar answered Sep 30 '22 09:09

numberwhun


Try installing it via:

bash <(curl -s http://php-osx.liip.ch/install.sh) 

Or install by hand:

curl -s -o /tmp/packager.tgz http://php-osx.liip.ch/packager/packager.tgz sudo tar -C /usr/local  -xzf /tmp/packager.tgz 

Then install packer:

sudo /usr/local/packager/packager.py install 5.4-frontenddev 

otherwise update it via:

sudo /usr/local/packager/packager.py install tools-frontenddev # Ignore  
like image 30
kenorb Avatar answered Sep 30 '22 09:09

kenorb