Нужна помощь в обновлении PEAR для установки PHPUnit - PullRequest
3 голосов
/ 23 марта 2012

Я пытаюсь установить PHPUnit с PEAR. Вот что я бегу ...

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 Ответ

6 голосов
/ 23 марта 2012
  1. Загрузите и распакуйте Structures_Graph с веб-сайта pear.php.net.( Прямая ссылка ) Примечание:?Возможно, вы захотите получить версию более старую, чем ваша текущая установка PEAR, хотя у меня не было проблем с последней версией (1.0.4) при запуске PEAR 1.8.0

  2. Перемещение папок / файловна место Чтобы найти, куда переместить эту папку, если вы не знаете: cmdline> pear config-show Найдите путь к «PEAR directory php_dir», который является вашей папкой PEAR \ lib

Папка «Structures» -> переместиться в папку «PEAR \ lib»

Остальные можно удалить, так как они будут созданы при фактической установке Structures_Graph, но для справки: «ЛИЦЕНЗИЯ» -> удалитьили переместите его в корневой каталог «PEAR», или в папку «docs», или в любую другую папку «docs» -> удалите или переместите в папку «tests» - «PEAR \ docs» -> удалите перемещение в пакет «PEAR \ tests».xml "-> delete и любые другие файлы пакета

Установите «Structures_Graph». Несмотря на наличие файлов, Structures_Graph на самом деле еще не установлен.командная строка> pear -a install Structures_Graph Это установит последнюю версию из настроенного вами канала (например, pear.php.net). Аргумент -a также установит все зависимые пакеты

Обновите установку PEAR до текущей версии cmdline> pear upgrade PEAR

Обновите пакет Console_GetOpt.Вероятно, он был неправильно установлен, но cmdline> pear upgrade Console_Getopt

Ссылки:

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

Не могуустановить PEAR на Windows 7, ошибка структуры / графика

...