gpt4 book ai didi

phpunit - 问题升级到 phpunit 3.5.13

转载 作者:行者123 更新时间:2023-12-05 00:04:50 24 4
gpt4 key购买 nike

我一直在使用 phpunit,从 3.5.8 开始,随后升级到 3.5.10,现在升级到 3.5.11

我今天想使用以下命令升级到 3.5.13:

pear channel 更新 pear.phpunit.de
pear 升级phpunit/PHPUnit

不幸的是,pear 只升级了自己,但是 phpunit 的升级失败了,如下所示。是的,我处于管理员模式,所以授权应该不是问题。我觉得这更奇怪,因为我之前已经成功执行了两次升级。因此,我很难相信这是一个特定于我的设置的问题(开发机器运行的是 Windows 7 64Bit)。

有没有其他人遇到过这个问题并且可以提供解决方案?

'pear upgrade phpunit/PHPUnit'的输出:

第一次运行:

>pear upgrade phpunit/PHPUnit
phpunit/PHPUnit requires PEAR Installer (version >= 1.9.2), installed version is
1.9.1
phpunit/PHPUnit can optionally use PHP extension "dbus"
phpunit/File_Iterator requires PEAR Installer (version >= 1.9.2), installed vers
ion is 1.9.1
downloading YAML-1.0.5.tgz ...
Starting to download YAML-1.0.5.tgz (9,966 bytes)
.....done: 9,966 bytes
downloading XML_RPC2-1.0.8.tgz ...
Starting to download XML_RPC2-1.0.8.tgz (67,063 bytes)
...done: 67,063 bytes
downloading PEAR-1.9.2.tgz ...
Starting to download PEAR-1.9.2.tgz (295,120 bytes)
...done: 295,120 bytes
downloading Cache_Lite-1.7.9.tgz ...
Starting to download Cache_Lite-1.7.9.tgz (30,318 bytes)
...done: 30,318 bytes
downloading Console_Getopt-1.3.1.tgz ...
Starting to download Console_Getopt-1.3.1.tgz (4,471 bytes)
...done: 4,471 bytes
upgrade ok: channel://pear.symfony-project.com/YAML-1.0.5
upgrade ok: channel://pear.php.net/Console_Getopt-1.3.1
upgrade ok: channel://pear.php.net/PEAR-1.9.2
upgrade ok: channel://pear.php.net/Cache_Lite-1.7.9
upgrade ok: channel://pear.php.net/XML_RPC2-1.0.8
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)

PEAR: To install optional features use "pear install pear/PEAR#featurename"

第二次运行:
>pear upgrade phpunit/PHPUnit
phpunit/PHPUnit can optionally use PHP extension "dbus"
downloading PHPUnit-3.5.13.tgz ...
Starting to download PHPUnit-3.5.13.tgz (118,553 bytes)
..........................done: 118,553 bytes
could not extract the package.xml file from "C:\Program Files (x86)\Zend\ZendSer
ver\bin\tmp\PHPUnit-3.5.13.tgz" Unable to create directory 'C:/Program/Fil7414.t
mp'
Unable to create path for C:/Program/Fil7414.tmp/package.xml
Download of "phpunit/PHPUnit" succeeded, but it is not a valid package archive
Error: cannot download "phpunit/PHPUnit"
downloading File_Iterator-1.2.6.tgz ...
Starting to download File_Iterator-1.2.6.tgz (3,439 bytes)
...done: 3,439 bytes
could not extract the package.xml file from "C:\Program Files (x86)\Zend\ZendSer
ver\bin\tmp\File_Iterator-1.2.6.tgz" Unable to create directory 'C:/Program/Fil7
675.tmp'
Unable to create path for C:/Program/Fil7675.tmp/package.xml
Download of "phpunit/File_Iterator" succeeded, but it is not a valid package arc
hive
Error: cannot download "phpunit/File_Iterator"
Download failed
upgrade failed

这是 pear 的配置:
C:\Users\Hanno Schupp>pear config-show
PHP Warning: Module 'Zend Data Cache' already loaded in Unknown on line 0
PHP Warning: Zend Extension Manager: Cannot load Zend Data Cache module in Unkn
own on line 0
PHP Warning: Module 'Zend Utils' already loaded in Unknown on line 0
PHP Warning: Zend Extension Manager: Cannot load Zend Utils module in Unknown o
n line 0
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover <not set>
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir C:\Program Files
(x86)\Zend\ZendServer\bin
PEAR documentation directory doc_dir C:\Program Files
(x86)\Zend\ZendServer\bin\docs
PHP extension directory ext_dir C:\Program Files
(x86)\Zend\ZendServer\lib\phpext

PEAR directory php_dir C:\Program Files
(x86)\Zend\ZendServer\bin\pear
PEAR Installer cache directory cache_dir C:\Users\HANNOS~1\AppData\Local\
Temp\pear\cache
PEAR configuration file cfg_dir C:\Program Files
directory (x86)\Zend\ZendServer\bin\cfg
PEAR data directory data_dir C:\Program Files
(x86)\Zend\ZendServer\bin\data
PEAR Installer download download_dir C:\Program Files
directory (x86)\Zend\ZendServer\bin\tmp
PHP CLI/CGI binary php_bin C:\Program Files
(x86)\Zend\ZendServer\bin\.\php.
exe
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
--program-suffix passed to php_suffix <not set>
PHP's ./configure
PEAR Installer temp directory temp_dir C:\Program Files
(x86)\Zend\ZendServer\bin\tmp
PEAR test directory test_dir C:\Program Files
(x86)\Zend\ZendServer\bin\tests
PEAR www files directory www_dir C:\Program Files
(x86)\Zend\ZendServer\bin\www
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 0
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin c:\gnupg\gpg.exe
Signature Key Directory sig_keydir C:\Program Files
(x86)\Zend\ZendServer\bin\pearke
ys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename C:\Program Files
(x86)\Zend\ZendServer\bin\pear.i
ni
System Configuration File Filename C:\Program Files
(x86)\Zend\ZendServer\bin\pearsy
s.ini
enter code here

最佳答案

更新

作为@ amateur barista和@ Tibor已经指出,您可以在不修改 pear.ini 的情况下应用相同的修复程序。使用以下命令:

> pear config-set temp_dir "C:\tmp"
> pear config-set download_dir "C:\tmp"

原来的

我在运行 WampServer 的 Windows 7 64 位机器上遇到了同样的问题.

看来PEAR处理了 temp_dirdownload_dir变量不同。对于 download_dir它正确处理路径中的空格,而对于 temp_dir它变成了 FUBAR'd。

以下是纠正步骤:
  • 打开您的 pear.ini (我的是:C:\Program Files (x86)\WAMP\bin\php\php5.3.4\pear.ini)

    注:这个文件是 serialize在更改任何内容之前,请确保您了解语法。
  • 更改 temp_dirdownload_dir变量到没有空格的路径。

    示例(之前):
    s:8:"temp_dir";s:48:"C:\Program Files (x86)\WAMP\bin\php\php5.3.4\tmp";s:12:"download_dir";s:48:"C:\Program Files (x86)\WAMP\bin\php\php5.3.4\tmp"

    示例(之后):
    s:8:"temp_dir";s:6:"C:\tmp";s:12:"download_dir";s:6:"C:\tmp"
  • 全部完成!再次尝试您的安装命令。

  • 据推测,您可能只需要更改 pear.ini 中的路径之一。但这就是我让它工作的方式。

    关于phpunit - 问题升级到 phpunit 3.5.13,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5265494/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com