Phalcon 在 mac m1 上安装失败

Phalcon failed install on mac m1

我按照这些步骤在我的 mac m1 上安装了 phalcon,我的 php 版本是 7.4.20

第 1 步:冲泡水龙头 tigerstrikemedia/homebrew-phalconphp

第二步:brew 安装php72-phalcon

第 3 步:将此行添加到 php.ini

extension=/opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so

step4:php -v,显示错误

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so' (tried: /opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so (dlopen(/opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so, 9): Symbol not found: __zval_ptr_dtor
  Referenced from: /opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so
  Expected in: flat namespace
 in /opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so), /opt/homebrew/lib/php/pecl/20190902//opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so.so (dlopen(/opt/homebrew/lib/php/pecl/20190902//opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so.so, 9): image not found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so' (tried: /opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so (dlopen(/opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so, 9): Symbol not found: __zval_ptr_dtor
  Referenced from: /opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so
  Expected in: flat namespace
 in /opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so), /opt/homebrew/lib/php/pecl/20190902//opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so.so (dlopen(/opt/homebrew/lib/php/pecl/20190902//opt/homebrew/Cellar/php72-phalcon/3.4.2/phalcon.so.so, 9): image not found)) in Unknown on line 0
PHP 7.4.20 (cli) (built: Jun  3 2021 19:10:14) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
    with Zend OPcache v7.4.20, Copyright (c), by Zend Technologies

我该如何解决这个问题?谢谢!!

“php72-phalcon”中的“72”指的是 PHP 7.2,但您使用的是 PHP 7.4,因此它不会兼容 - 扩展需要针对 PHP 的正确版本构建,以便 运行。它正在安装的 Phalcon 版本 (3.4.2) 也已过时,因为这是 PHP.

版本支持的最后一个版本

在 Mac 上安装 Phalcon 4.0 的说明在这里:https://docs.phalcon.io/4.0/en/installation#macos

他们指的是不同的自制程序存储库:

brew tap phalcon/extension https://github.com/phalcon/homebrew-tap
brew install phalcon