Install Pecl On Mac

Install PHP and PECL on Ubuntu/Debian: For PHP5: $ sudo apt-get install php5 php5-dev php-pear phpunit For PHP7. Install PHP and PECL on Mac. So I changed to php version 7.2 and run sudo pecl install mcrypt-1.0.1 after that, I switch to PHP 7.1 and it works I'm using mac os v10.14 and apache environment. I tried to do sudo pecl install mcrypt which tries to install mcrypt-1.0.2, but it fails on High Sierra on PHP 7.2. Using exactly sudo pecl install mcrypt-1.0.1 it did the trick.

  • Mac の PHP ローカル開発環境で intl がないというエラーが出たら brew install で PHP 本体をインストールしてください。環境変数 PATH に /usr/local/bin が通っていればそれで解決します。.
  • Update: Configure command work for me when I chose this option:./configure –without-iconv Otherwise I am getting the error: ‚zendconfig.h‘ file not found —- Original article MAMP is an easy to install set of tools for that provides a great local development environment for Mac users (Mac Apache MySQL PHP). OS X does ship with its own built in versions of these tools, but MAMP adds.
  • PECL is a repository of PHP extensions that are made available to you via the PEAR packaging system. This section of the manual is intended to demonstrate how to obtain and install PECL extensions. These instructions assume /your/phpsrcdir/ is the path to the PHP source distribution, and that extname is the name of the PECL extension.
  • Question or issue on macOS: I wanted to install amqp with pecl for my mac sierra. I installed php with brew, with pecl install amqp I receive an error: checking for amqp using pkg-config configure: error: librabbitmq not found.
  • 概要 CentOS5系で yum でインストールした zsh で以下エラー発.

To install the pecl run following command:

Install pecl mac brew
sudo php /usr/lib/php/install-pear-nozlib.phar -d /usr/local/lib/php -b /usr/local/bin

To install autoconf:

To install intl:

cd /Applications/XAMPP/bin

Then php -m | grep intl, if it returns you intl then it is installed. If not installed then should return empty.

Now,

Will ask specify where ICU libraries and headers can be found, simply hit enter,

And this will install intl, also will return this message You should add 'extension=intl.so' to php.ini.

restart your apache: sudo apachectl restart

More from my site

MAMP is an easy to install set of tools for that provides a great local development environment for Mac users (Mac Apache MySQL PHP). OS X does ship with its own built in versions of these tools, but MAMP adds lots of goodies. The newest version of MAMP includes a graphical configuration tool, a choice of PHP versions, web-based tools for administering your databases, and a variety of useful PHP extensions.

Unfortunately, MAMP doesn’t include everything. If you’re developing a site that needs additional PHP extensions like the Memcached library or exotic database drivers, you’ll need to use the PEAR and PECL tools to build and install them. PECL (PHP Extension Community Library) and PEAR (PHP Extension and Application Repository) both provide access to a large pool of useful PHP add-ons, but using them with MAMP requires you to do a bit of extra configuration. In this article, you’ll learn how to get them running on the latest version of MAMP (2.x).

INSTALLING COMPONENTS

The usual method for installing PEAR and PECL components is via the command line. Here is an example for installing PHPUnit.

2
4
6
$pear
/usr/bin/php

LET’S FIX IT

To rectify this we need to add PHP’s binaries to our path. The path is an environment variable that denotes which directories to look for commands in. The path can be modified by editing the „.profile“ file under your home directory. I’ve used version 5.3.6 of PHP, but you can choose from whichever versions are available to you.

2
4
6
8
10
$which php
/Applications/MAMP/bin/php/php5.3.6/bin/pear
$which pecl


If this doesn’t work make sure that your PHP binaries have execute permissions, an easy way to tell is by running

2
4
6
$mkdir/Applications/MAMP/bin/php/php5.3.6/include
$mv~/Downloads/MAMP_components_2.0.2/php-5.3.6/Applications/MAMP/bin/php/php5.3.6/include/php
$cd/Applications/MAMP/bin/php/php5.3.6/include/php


***./configure –without-iconv***

Pecl

All being well, you should now be able to install PECL extensions.