Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Xdebug for MAMP with pecl

At http://xdebug.org/docs/install I read:

Installing with PEAR/PECL is as easy as:

# pecl install xdebug

When I try this, I get errors:

$ pecl install xdebug
bash: pecl: command not found

Trying again, from the folder that contains pecl:

cd /Applications/MAMP/bin/php/php5.5.3/bin/
bash-3.2$ ./pecl install xdebug
No releases available for package "pecl.php.net/xdebug"
install failed

However visiting pecl.php.net/xdebug redirects to http://pecl.php.net/package/xdebug, which indicates that the package clearly exists.

What else can I try?

like image 333
James Newton Avatar asked May 11 '15 19:05

James Newton


2 Answers

Try running the following command,

pecl channel-update pecl.php.net

like image 183
user1310789 Avatar answered Sep 28 '22 04:09

user1310789


To get it working what I did was manually compile and install the debug extension with the following commands:

wget http://xdebug.org/files/xdebug-x.x.x.tgz
tar -xzvf xdebug-x.x.x.tgz
cd xdebug-x.x.x
phpize
./configure
make
make install
like image 45
Leon Lombard Avatar answered Sep 28 '22 05:09

Leon Lombard