使用 - pear install pear.phpunit.de/PHPUnit导致致命错误

时间:2022-02-03 20:12:46

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:

我正在远程CI系统(Fedora)上执行以下shell命令来安装php工具:

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 -

在执行php unit命令时遇到以下异常 -

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?

还有我需要添加的命令吗?

2 个解决方案

#1


2  

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.

您需要更新您的PEAR。这是一个错误报告,显示相同的错误http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619307,解决方案是获取更新的PEAR版本。

#2


1  

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

pear安装程序试图告诉您的是,尝试安装软件包时出错。

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:

是的,您使用显示的命令从php站点安装了“当前/正确”的梨包,这样就留下了三个选项:

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

a)访问/ tmp /或其他一些未正确报告的pear config-show文件夹的权限问题。

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

如果你能做到这一点,也许投掷sudo可能会有所帮助?

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

b)你还有另一个梨版本,或者你没有安装系统范围的梨或与该问题相关的东西。

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

尝试运行梨升级梨,看看是否有帮助。梨版应该产生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.

c)它失败了,因为它无法连接到它想要从中提取文件的服务器,然后它无法尝试报告错误。

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

也许运行wget pear.phpunit.de只是为了查看是否可以检查或防火墙阻止它。


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 * php chat.

这是我目前看到的唯一两个选项,无需更多调试即可解决您的问题。如果这还不够,你可以在#phpunit或* php chat中找到关于freenodeIrc的帮助。

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

所有的php-qa工具都可以从一个git checkout运行,但通常,(#)更麻烦的是让它运行起来更麻烦。

#1


2  

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.

您需要更新您的PEAR。这是一个错误报告,显示相同的错误http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619307,解决方案是获取更新的PEAR版本。

#2


1  

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

pear安装程序试图告诉您的是,尝试安装软件包时出错。

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:

是的,您使用显示的命令从php站点安装了“当前/正确”的梨包,这样就留下了三个选项:

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

a)访问/ tmp /或其他一些未正确报告的pear config-show文件夹的权限问题。

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

如果你能做到这一点,也许投掷sudo可能会有所帮助?

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

b)你还有另一个梨版本,或者你没有安装系统范围的梨或与该问题相关的东西。

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

尝试运行梨升级梨,看看是否有帮助。梨版应该产生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.

c)它失败了,因为它无法连接到它想要从中提取文件的服务器,然后它无法尝试报告错误。

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

也许运行wget pear.phpunit.de只是为了查看是否可以检查或防火墙阻止它。


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 * php chat.

这是我目前看到的唯一两个选项,无需更多调试即可解决您的问题。如果这还不够,你可以在#phpunit或* php chat中找到关于freenodeIrc的帮助。

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

所有的php-qa工具都可以从一个git checkout运行,但通常,(#)更麻烦的是让它运行起来更麻烦。