我需要设置vfsStream
以在我的环境中使用PHPUnit。不幸的是,这个项目非常陈旧,我无法使用作曲家。相反,我尝试使用梨根据documentation安装它。 Bovigo
频道被正确发现,但当我尝试安装vfs
时,我得到了以下堆栈跟踪:
[vagrant@dev site]$ pear install bovigo/vfsStream-beta
Warning: lstat(): Lstat failed for /var/cache/php-pear/ea87df910d5f186e8b68f01fb94241bcrest.cacheid in PEAR/REST.php on line 276
PHP Warning: lstat(): Lstat failed for /var/cache/php-pear/ea87df910d5f186e8b68f01fb94241bcrest.cacheid in /usr/share/pear/PEAR/REST.php on line 276
PHP Stack trace:
PHP 1. {main}() /usr/share/pear/pearcmd.php:0
PHP 2. PEAR_Command_Common->run() /usr/share/pear/pearcmd.php:305
PHP 3. PEAR_Command_Install->doInstall() /usr/share/pear/PEAR/Command/Common.php:271
PHP 4. PEAR_Downloader->download() /usr/share/pear/PEAR/Command/Install.php:661
PHP 5. PEAR_Downloader_Package->initialize() /usr/share/pear/PEAR/Downloader.php:279
PHP 6. PEAR_Downloader_Package->_fromString() /usr/share/pear/PEAR/Downloader/Package.php:190
PHP 7. PEAR_Downloader->_getPackageDownloadUrl() /usr/share/pear/PEAR/Downloader/Package.php:1713
PHP 8. PEAR_REST_13->getDownloadURL() /usr/share/pear/PEAR/Downloader.php:850
PHP 9. PEAR_REST->retrieveData() /usr/share/pear/PEAR/REST/13.php:68
PHP 10. PEAR_REST->saveCache() /usr/share/pear/PEAR/REST.php:163
PHP 11. PEAR_REST->saveCacheFile() /usr/share/pear/PEAR/REST.php:246
PHP 12. lstat() /usr/share/pear/PEAR/REST.php:276
No releases available for package "pear.bovigo.org/vfsStream"
install failed
答案 0 :(得分:1)
看起来您可能需要通过sudo执行此操作,例如
$ sudo pear ....