1

While I tried this: sudo pear install -o pear.doctrine-project.org/DoctrineORM

I got the following error:

    Package "pear.doctrine-project.org/DoctrineORM" dependency  "pear.symfony.com/Console" has no releases
    Package "pear.doctrine-project.org/DoctrineDBAL" dependency "pear.symfony.com/Console" has no releases
    doctrine/DoctrineORM requires package "pear.symfony.com/Console" (version >= 2.0.0)
    doctrine/DoctrineORM requires package "pear.symfony.com/Yaml" (version >= 2.0.0), installed version is 1.0.6
    doctrine/DoctrineDBAL requires package "pear.symfony.com/Console" (version >= 2.0.0)
    No valid packages found
    install failed

Solved the above by doing the following: sudo apt-get purge php-pear

Ended up in results like:

    Removing php-pear ...
    Purging configuration files for php-pear ...
    dpkg: warning: while removing php-pear, directory '/usr/share/doc/php5-common/PEAR' not empty so not removed
    dpkg: warning: while removing php-pear, directory '/usr/share/php/.channels' not empty so not removed

Same was for the following folders:

    /usr/share/php/.registry/
    /usr/share/php/.channels/.alias
    /usr/share/php/data
    /usr/share/doc/php5-common/PEAR/Archive_Tar/docs
    /usr/share/doc/php5-common/PEAR

So I removed them all and then purged php-pear completely and reinstalled it again.

now, sudo pear channel-discover pear.doctrine-project.org also didn't say channel already in registry and the later steps also succeeded.

Though I have solved my problem in the above steps. While I failed using the suggestions stated at comments and answers to this post

But I am just curious what could have been wrong in the first place. How PEAR wasn't being able to fetch proper versions of Doctrine2?

Even the accepted answer's process didn't help.

Community
  • 1
  • 1
Lenin
  • 570
  • 16
  • 36
  • I had [posted this as an answer](http://stackoverflow.com/questions/12536668/how-do-i-correctly-install-phpunit-with-pear/13620648#13620648) as I was able to get rid of the PEAR problem I was having. But it was deleted while I thought the process I followed could have solved someone though. – Lenin Dec 10 '12 at 09:03

2 Answers2

0

You should have upgraded the pear.symfony.com/Yaml package. PEAR listed version 2.0.0 as requirement, but you only had 1.0.6:

$ pear upgrade symfony/yaml

Also, it did not find (compatible) releases of pear.symfony.com/console - this was the main reason for the failure. A solution would have been a pear clear-cache call, followed by a possible pear channel-update pear.symfony.com call. After that, the console dep should be installed automatically.

cweiske
  • 30,033
  • 14
  • 133
  • 194
  • What is the way to upgrade in such situation (ie for Yaml). I did the channel-update but didn't do a `pear clear-cache`. – Lenin Jan 23 '13 at 21:51
0

I have the same problem as this topic states but with Doctrine pear installation.

While I try this: sudo pear install -o pear.doctrine-project.org/DoctrineORM

I get the following error:

        Package "pear.doctrine-project.org/DoctrineORM" dependency  "pear.symfony.com/Console" has no releases
        Package "pear.doctrine-project.org/DoctrineDBAL" dependency "pear.symfony.com/Console" has no releases
        doctrine/DoctrineORM requires package "pear.symfony.com/Console" (version >= 2.0.0)
        doctrine/DoctrineORM requires package "pear.symfony.com/Yaml" (version >= 2.0.0), installed version is 1.0.6
        doctrine/DoctrineDBAL requires package "pear.symfony.com/Console" (version >= 2.0.0)
        No valid packages found
        install failed

I have applied what @Paulo and @Parris suggested in another SO QA. But that did not help. Posting it here just for the record.

Edit:

Solved the above by doing the following: sudo apt-get purge php-pear

Ended up in results like:

        Removing php-pear ...
        Purging configuration files for php-pear ...
        dpkg: warning: while removing php-pear, directory '/usr/share/doc/php5-common/PEAR' not empty so not removed
        dpkg: warning: while removing php-pear, directory '/usr/share/php/.channels' not empty so not removed

Same was for the following folders:

        /usr/share/php/.registry/
        /usr/share/php/.channels/.alias
        /usr/share/php/data
        /usr/share/doc/php5-common/PEAR/Archive_Tar/docs
        /usr/share/doc/php5-common/PEAR

So I removed them all and then purged php-pear completely and reinstalled it again.

now, sudo pear channel-discover pear.doctrine-project.org also didn't say channel already in registry and the later steps also succeeded.

Thanks all!

Lenin
  • 570
  • 16
  • 36