Reputation: 7114
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?
Upvotes: 7
Views: 5204
Reputation: 631
This worked for me. Installed on Mac, not MAMP though
brew install php
sudo pecl install xdebug
Upvotes: 0
Reputation: 920
I got the same error message when trying to install Xdebug via PECL. When I tried to follow user1310789’s advice to update the channel, I got the same error message as in this question:
Updating channel "pecl.php.net"
Channel "pecl.php.net" is not responding over http://, failed with message:
Connection to 'pecl.php.net:80' failed: Connection refused
Trying channel "pecl.php.net" over https:// instead
Cannot retrieve channel.xml for channel "pecl.php.net" (Connection to `pecl.php.net:443' failed: Connection refused)
The accepted answer to that question indirectly held the answer. I didn’t have to create a proxy, but I noticed the pear
command in the answer was run as root.
I tried updating the PEAR and PECL channels using sudo
– and voilà, it worked immediately. Installing Xdebug still failed with the same error, but sudo
ing it again fixed it.
Why PEAR and PECL appear to suddenly require being run as root to function I have no idea. It feels quite iffy, running a remote, online installer with root access. But it was apparently what was needed in my case.
Upvotes: 1
Reputation: 53
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
Upvotes: 1
Reputation: 117
Try running the following command,
pecl channel-update pecl.php.net
Upvotes: 5