mac 安装Phalcon 踩坑了?
方式一 :>= php7.3
先安装 psr扩展
GitHub - jbboehr/php-psr: PHP extension providing the accepted PSR interfaceshttps://github.com/jbboehr/php-psrGitHub - jbboehr/php-psr: PHP extension providing the accepted PSR interfaces
git clone https://github.com/jbboehr/php-psr.git
cd php-psr
phpize
./configure
make
make test
sudo make install
echo extension=psr.so | tee -a /usr/local/etc/php/7.3/php.ini
编译安装phalcon扩展
PECL :: Package :: phalcon
wget https://pecl.php.net/get/phalcon-4.1.0.tgz
tar -zxvf phalcon-4.1.0.tgz && cd phalcon-4.1.0
phpize
./configure
make && make install
php.ini加入
extension=phalcon.so
重启php
php -m | grep phal
看到 phalcon 表明安装成功
m1 可能会有'pcre2.h' file not found?的报错
执行ln?-s?/opt/homebrew/include/pcre2.h?/opt/homebrew/Cellar/php@7.4/7.4.26_1/include/php/ext/pcre/pcre2.h(你的Cellar 中PHP的路径)
方式二?:<?php7.3
?
git clone cphalcon: https://github.com/phalcon/cphalcon
cd cphalcon/build
sudo ./install
php.ini加入
extension=phalcon.so
重启php
?
|