tags:

views:

1311

answers:

3

I have problems installing PHPUnit 3.4.6 via PEAR 1.9.0. After I discover channel pear.phpunit.de and try to use one of following commands:

pear install phpunit/PHPUnit

pear install --alldeps phpunit/PHPUnit

pear install --onlyreqdeps phpunit/PHPUnit

it fails, giving me following error:

No releases available for package "pear.phpunit.de/PHPUnit"

install failed

I found several threads from people with the same problem, but upgrading PEAR to the newest version usually worked for them. Also there seems to be close to no tutorials for installing PHPUnit for Windows.

EDIT:

I've also tried to change prefered_state to beta; didn't help.

I've also tried to get list of all available packages:

pear remote-list -c phpunit

It gives me another error:

Cannot download non-http URL "/c/categories.xml"

+3  A: 

It simply installs me when I type:

pear channel-discover pear.phpunit.de
pear install --onlyreqdeps phpunit/PHPUnit

maybe there is a problem with the versions, you must set the preferred_state of the pear packages to different than stable:

pear config-set preferred_state beta
KARASZI István
Still the same problem.
Ondrej Slinták
+2  A: 

What is the full error message output? It failed for me until I installed using the --alldeps option and ran pear channel-discover pear.symfony-project.com

sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear install --alldeps phpunit/PHPUnit
ctshryock
Still the same problem.
Ondrej Slinták
can you edit your original post with the full error message you get when running `sudo pear install --alldeps phpunit/PHPUnit` ?
ctshryock
Ok, edited original post. I cannot (or not sure how to) use "sudo" (I'm a Windows user), but I'm administrator, so it shouldn't be a problem.
Ondrej Slinták
+8  A: 

I had the same problem yesterday, and solved it by updating the channels

pear update-channels

before trying to install phpUnit.

Hope this helps.

Davide
Helped. Thanks a lot!
Ondrej Slinták