【问题标题】:Unable to upgrade PEAR from 1.9.2 to 1.9.4无法将 PEAR 从 1.9.2 升级到 1.9.4
【发布时间】:2012-09-04 12:00:06
【问题描述】:

我在 Ubuntu 11.10 上尝试从 1.9.2 升级到 1.9.4,但它根本不起作用。以下是我按顺序执行的命令

$ sudo apt-get install php-pear
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php-pear is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-3.0.0-14-generic-pae libaccess-bridge-java-jni libaccess-bridge-java
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
$ sudo pear channel-update pear.php.net
Updating channel "pear.php.net"
Channel "pear.php.net" is up to date
$ sudo pear upgrade-all
Nothing to upgrade-all
$ sudo pear install –alldeps pear.phpunit.de/PHPUnit 
parsePackageName(): invalid package name "–alldeps" in "–alldeps"
invalid package name/package file "–alldeps"
Did not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to download automatically
phpunit/PHPUnit requires PEAR Installer (version >= 1.9.4), installed version is 1.9.2
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.1.0)
phpunit/Text_Template requires PEAR Installer (version >= 1.9.4), installed version is 1.9.2
phpunit/PHP_CodeCoverage requires PEAR Installer (version >= 1.9.4), installed version is 1.9.2
phpunit/PHP_CodeCoverage requires package "phpunit/Text_Template" (version >= 1.1.1)
phpunit/PHP_CodeCoverage can optionally use PHP extension "xdebug" (version >= 2.0.5)
phpunit/PHPUnit_MockObject requires PEAR Installer (version >= 1.9.4), installed version is 1.9.2
phpunit/PHPUnit_MockObject requires package "phpunit/Text_Template" (version >= 1.1.1)
phpunit/PHP_TokenStream requires PEAR Installer (version >= 1.9.4), installed version is 1.9.2
No valid packages found
install failed

有什么想法吗?

【问题讨论】:

  • --alldeps 需要 2 - : sudo pear install --alldeps pear.phpunit.de/PHPUnit

标签: php ubuntu pear


【解决方案1】:

alldeps 选项之前需要两个-!试试--alldeps--force

sudo pear install -–alldeps --force pear.phpunit.de/PHPUnit 

【讨论】:

  • 用户需要先升级PEAR安装程序,否则会收到Validation Error: This package.xml requires PEAR version 1.9.4 to parse properly, we are version 1.9.1之类的消息。
  • 当出现关于错误 PEAR 版本的 PEAR 错误时,请先执行sudo pear upgrade pear
猜你喜欢
  • 2011-09-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多