2012-09-11 111 views
2

我在Ubuntu 11.10上並試圖從1.9.2升級到1.9.4,但它根本無法工作。下面是我在序列無法將PEAR從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 

任何想法下面的命令?

+1

'--alldeps'需要2 - :'須藤梨安裝--alldeps pear.phpunit.de/PHPUnit' –

回答

-1

alldeps選項之前有兩個-選項!與--alldeps--force試試:

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

用戶需要的指令先升級PEAR安裝,否則他會得到諸如「驗證錯誤:這個package.xml需要PEAR版本1.9.4才能正確解析的消息,我們是版本1.9.1'。 –

+1

當PEAR版本錯誤時,首先執行'sudo pear upgrade pear'命令。 – powtac

+1

感謝他們工作 –