简体   繁体   English

PHP:安装 Pear 时出现“致命错误:调用未定义的 function _determineIfPowerpc”

[英]PHP : "Fatal error: Call to undefined function _determineIfPowerpc" when installing Pear

I'm working on an iMac with MacOS 10.9.5 and using PHP 5.4.45 (phpinfo details on demand).我正在使用 MacOS 10.9.5 的 iMac 并使用 PHP 5.4.45(按需提供 phpinfo 详细信息)。

To use ImageMagick, I understand I need to install PECL, and before that I need Pear.要使用 ImageMagick,我知道我需要安装 PECL,在此之前我需要 Pear。 I've found the relevant information quite easily, thankfully, and have started applying it.谢天谢地,我很容易找到相关信息,并开始应用它。

Of course, I've been doing the following with my admin account, which duly serves for such purposes.当然,我一直在使用我的管理员帐户执行以下操作,该帐户可用于此类目的。

The first step, curl -O https://pear.php.net/go-pear.phar , works like a charm.第一步, curl -O https://pear.php.net/go-pear.phar ,就像一个魅力。

However, when I try sudo php -d detect_unicode=0 go-pear.phar (recommended for a system-wide installation, which I feel I need to use PHP with my user account), I get the following message:但是,当我尝试sudo php -d detect_unicode=0 go-pear.phar (推荐用于系统范围的安装,我觉得我需要使用我的用户帐户使用 PHP)时,我收到以下消息:

Fatal error: Call to undefined function _determineIfPowerpc() in phar:///Users/myadmin/Downloads/go-pear.phar/OS/Guess.php on line 159

(Before launching the install, I do set my installation base to /usr/local/pear and my binaries directory to /usr/local/bin as recommended.) (在启动安装之前,我按照建议将我的安装基础设置为 /usr/local/pear 并将我的二进制文件目录设置为 /usr/local/bin。)

I've noticed that the link to go-pear.phar on the above-linked page can be clicked simply and a big chunk of text and code appears;我注意到上面链接页面上的 go-pear.phar 链接可以简单地单击,然后会出现一大块文本和代码; that code seems to have declarations for _determineIfPowerpc() that are consistent with its calls.该代码似乎具有与其调用一致的_determineIfPowerpc()声明。

Am I doing something wrong, and if so, what is it?我做错了什么,如果是,那是什么?

As Chris Haas already noted , you need to get go-pear.phar with at least version v1.10.13.正如Chris Haas 已经指出的那样,您需要获得版本至少为 v1.10.13 的go-pear.phar pear.phar。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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