Error trying to install PHPUnit from PEAR

12,223

Solution 1

Have you registered the channel required to install YAML?

pear channel-discover pear.symfony-project.com

Depending on how pear is installed and configured, you may need to preface the command with "sudo" to run it as root.

From the PHPUnit manual:

The PEAR channel (pear.phpunit.de) that is used to distribute PHPUnit needs to be registered with the local PEAR environment. Furthermore, a component that PHPUnit depends upon is hosted on the Symfony Components PEAR channel (pear.symfony-project.com).

Solution 2

It's no longer dependant on the pear.symfony-project.com channel, you need to add the pear.symfony.com channel instead. Please see here

Solution 3

If this does not work for you:

pear channel-discover pear.symfony-project.com 

Try this:

pear channel-discover pear.symfony-project.de
Share:
12,223

Related videos on Youtube

Andrew
Author by

Andrew

Updated on September 17, 2022

Comments

  • Andrew
    Andrew almost 2 years
    $ sudo pear install phpunit/PHPUnit
    Unknown remote channel: pear.symfony-project.com
    phpunit/PHPUnit requires package "channel://pear.symfony-project.com/YAML" (version >= 1.0.2)
    phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
    No valid packages found
    install failed
    

    What do I need to do to be able to install PHPUnit?

  • Andrew
    Andrew over 14 years
    that didn't work for me, this was the message: pear channel-discover pear.symfony-project.com Discovering channel pear.symfony-project.com over http:// failed with message: channel-add: temp_dir is not writable: "/usr/local/temp" - You can change this location with "pear config-set temp_dir" Trying to discover channel pear.symfony-project.com over https:// instead Discovery of channel "pear.symfony-project.com" failed (channel-add: temp_dir is not writable: "/usr/local/temp" - You can change this location with "pear config-set temp_dir")
  • Andrew
    Andrew over 14 years
    nevermind, it worked when I prepended with "sudo"