简体   繁体   中英

Fatal error with - pear install pear.phpunit.de/PHPUnit

I followed this post but it did not help

I am executing following shell commands on a Remote CI system (Fedora) to install php tools:

wget http://pear.php.net/go-pear.phar
php go-pear.phar
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit

On execution of php unit command I encounter following exception -

pear install pear.phpunit.de/PHPUnit
PHP Fatal error:  Call to undefined method PEAR::raiseErro() in /usr/share/pear/PEAR/REST.php on line 165
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
Finished: FAILURE

Are there any more commands I need to add?

You need to update your PEAR. Here is a bug report showing the same error http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619307 and the solution is to get the updated PEAR version.

What the pear installer is trying to tell you is that there was an error when trying to install the package.

It fails because the pear version that is used is buggy :/

Yes you installed the "current/right" pear package from the php site with the commands shown so that leaves three options:

a) Some permission issue with access to /tmp/ or some other pear config-show folder that doesn't get properly reported.

Maybe throwing in a sudo might help if you can do that?

b) You still have another pear version running alongside or you didn't install pear system-wide or something related to that issue.

Try to run pear upgrade pear and see if that helps. pear version should produce 1.9.4 .

c) It's failing because it can't connect to the server it wants to pull the files from and it then fails trying to report the error.

Maybe run wget pear.phpunit.de just to see if that works to check or if your firewall blocks that.


Those are the only two options I currently see to solve your issue with pear without more debugging. Should that not suffice you can find help on freenodeIrc in #phpunit or in the stackoverflow php chat.

All php-qa-tools can be run from a git checkout but it is, usually, considerably(!) more hassle to get that to run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM