![使用 PEAR 安装程序安装 PHPUnit 时遇到问题(Windows)](https://linux22.com/image/795390/%E4%BD%BF%E7%94%A8%20PEAR%20%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F%E5%AE%89%E8%A3%85%20PHPUnit%20%E6%97%B6%E9%81%87%E5%88%B0%E9%97%AE%E9%A2%98%EF%BC%88Windows%EF%BC%89.png)
我正在尝试安装phpunit/PHPUnit
。我得到类似下面的信息,我认为问题是Archive/Tar.php
未找到?我尝试使用--alldeps
开关并得到相同的错误。尝试安装pear install archive_tar
甚至给出相同的错误,即Archive/Tar.php
未找到!
D:\ResourceLibrary\Frameworks>pear install phpunit/PHPUnit
phpunit/PHPUnit can optionally use PHP extension "dbus"
downloading PHPUnit-3.5.5.tgz ...
Starting to download PHPUnit-3.5.5.tgz (116,148 bytes)
.........................done: 116,148 bytes
Warning: require_once(Archive/Tar.php): failed to open stream: No such file or directory in PEAR\PackageFile.php on line
303
Warning: require_once(Archive/Tar.php): failed to open stream: No such file or directory in C:\Program Files (x86)\PHP\p
ear\PEAR\PackageFile.php on line 303
Call Stack:
0.0051 531000 1. {main}() C:\Program Files (x86)\PHP\pear\pearcmd.php:0
0.3031 3490920 2. PEAR_Command_Common->run() C:\Program Files (x86)\PHP\pear\pearcmd.php:305
0.3031 3490920 3. PEAR_Command_Install->doInstall() C:\Program Files (x86)\PHP\pear\PEAR\Command\Common.php:271
0.3672 5387880 4. PEAR_Downloader->download() C:\Program Files (x86)\PHP\pear\PEAR\Command\Install.php:661
62.4850 8482968 5. PEAR_Downloader_Package->download() C:\Program Files (x86)\PHP\pear\PEAR\Downloader.php:453
62.4906 8488512 6. PEAR_Downloader_Package->_fromUrl() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.p
hp:263
63.1216 8490512 7. PEAR_PackageFile->fromAnyFile() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.php:1
622
63.1226 8490616 8. PEAR_PackageFile->fromTgzFile() C:\Program Files (x86)\PHP\pear\PEAR\PackageFile.php:483
Fatal error: require_once(): Failed opening required 'Archive/Tar.php' (include_path='C:\Program Files (x86)\PHP\pear')
in C:\Program Files (x86)\PHP\pear\PEAR\PackageFile.php on line 303
Call Stack:
0.0051 531000 1. {main}() C:\Program Files (x86)\PHP\pear\pearcmd.php:0
0.3031 3490920 2. PEAR_Command_Common->run() C:\Program Files (x86)\PHP\pear\pearcmd.php:305
0.3031 3490920 3. PEAR_Command_Install->doInstall() C:\Program Files (x86)\PHP\pear\PEAR\Command\Common.php:271
0.3672 5387880 4. PEAR_Downloader->download() C:\Program Files (x86)\PHP\pear\PEAR\Command\Install.php:661
62.4850 8482968 5. PEAR_Downloader_Package->download() C:\Program Files (x86)\PHP\pear\PEAR\Downloader.php:453
62.4906 8488512 6. PEAR_Downloader_Package->_fromUrl() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.p
hp:263
63.1216 8490512 7. PEAR_PackageFile->fromAnyFile() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.php:1
622
63.1226 8490616 8. PEAR_PackageFile->fromTgzFile() C:\Program Files (x86)\PHP\pear\PEAR\PackageFile.php:483
D:\ResourceLibrary\Frameworks>
更新:我应该说它在 Windows 上,我在 Ubuntu 上安装没有问题
答案1
我通过重新安装 PEAR 解决了这个问题,我认为 Archive_Tar 应该与 PEAR 一起安装