簡體   English   中英

需要幫助升級PEAR才能安裝PHPUnit

[英]Need help upgrading PEAR to install PHPUnit

我正在嘗試用PEAR安裝PHPUnit。 這就是我正在運行的......

PEAR Version: 1.7.2
PHP Version: 5.3.8-ZS5.5.0
Zend Engine Version: 2.3.0
Running on: Windows NT L-PC 6.1 build 7600 (Windows 7 Home Premium Edition) i586

當我嘗試安裝時,我收到一條錯誤消息,說我需要升級PEAR ...

C:\Program Files (x86)\Zend\ZendServer\bin>pear install phpunit/PHPUnit
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.7.2
phpunit/PHPUnit requires package "channel://pear.symfony-project.com/YAML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.1.0)
phpunit/File_Iterator requires PEAR Installer (version >= 1.9.2), installed version is 1.7.2
phpunit/Text_Template requires PEAR Installer (version >= 1.9.4), installed version is 1.7.2
phpunit/PHP_CodeCoverage requires PEAR Installer (version >= 1.9.4), installed version is 1.7.2
phpunit/PHP_CodeCoverage requires package "phpunit/File_Iterator" (version >= 1.3.0)
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/PHP_Timer requires PEAR Installer (version >= 1.9.2), installed version is 1.7.2
phpunit/PHPUnit_MockObject requires PEAR Installer (version >= 1.9.4), installed version is 1.7.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.7.2
No valid packages found
install failed

所以我想我需要升級PEAR。 我跑梨升級梨,得到以下......

C:\Program Files (x86)\Zend\ZendServer\bin>pear upgrade pear
pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.7.2
downloading PEAR-1.9.4.tgz ...
Starting to download PEAR-1.9.4.tgz (296,332 bytes)
.............................................................done: 296,332 bytes

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used   any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead in PEAR\Validate.php on line 489
downloading Archive_Tar-1.3.9.tgz ...
Starting to download Archive_Tar-1.3.9.tgz (18,123 bytes)
...done: 18,123 bytes

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead in PEAR\Validate.php on line 489
downloading Structures_Graph-1.0.4.tgz ...
Starting to download Structures_Graph-1.0.4.tgz (30,318 bytes)
...done: 30,318 bytes

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead in PEAR\Validate.php on line 489
downloading XML_Util-1.2.1.tgz ...
Starting to download XML_Util-1.2.1.tgz (17,729 bytes)
...done: 17,729 bytes

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead in PEAR\Validate.php on line 489

Warning: require_once(Structures/Graph.php): failed to open stream: No such file or directory in PEAR\Download er.php on line 1230

Warning: require_once(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead in PEAR\Downloader.php on line 1230

但它沒有升級。 當我重新運行梨版時,它顯示我仍然在1.7.2。 我該如何解決?

  1. 從pear.php.net網站下載並解壓縮Structures_Graph。 直接鏈接 )注意:? 可能想要獲得比你當前安裝的PEAR更舊的版本,盡管我在運行PEAR 1.8.0時沒遇到最新版本(1.0.4)

  2. 將文件夾/文件移動到位要查找移動此文件夾的位置,如果您不知道:cmdline> pear config-show查找“PEAR目錄php_dir”的路徑,這是您的PEAR \\ lib文件夾

“Structures”文件夾 - >移動到“PEAR \\ lib”文件夾

其余的可以刪除,因為它們將在您實際安裝Structures_Graph時創建,但供參考:“LICENSE” - >刪除或將其移至“PEAR”根目錄,或文檔或“docs”文件夾 - >刪除或移入“PEAR \\ docs”文件夾“tests”文件夾 - >刪除移入“PEAR \\ tests”文件夾“package.xml” - >刪除,以及任何其他包文件

  1. 安裝“Structures_Graph”,即使文件存在,Structures_Graph還沒有真正安裝。 命令行> pear -a install Structures_Graph這將從您配置的通道安裝最新版本(例如pear.php.net)-a參數將安裝任何依賴包

  2. 將PEAR安裝升級到當前版本cmdline> pear upgrade PEAR

  3. 升級包Console_GetOpt。 它可能還沒有正確安裝cmdline> pear upgrade Console_Getopt

參考文獻:

http://www.sencha.com/forum/archive/index.php/t-120958.html

無法在Windows 7上安裝PEAR,結構/圖形錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM