linux ubuntu 安装 zephir

 
更多

记录一次 linux ubuntu 上安装 zephir的过程。

git clone https://github.com/zephir-lang/zephir.git

composer install

过程报错,说要先执行 composer update,执行 composer update 又报错,说缺乏 gmp 扩展,又去安装 gmp 扩展。

cd /usr/local/src/php-7.4/ext/gmp/
phpize
./configure –with-php-config=/usr/bin/php-config7.4 –with-gmp
make
make install
echo ‘extension=gmp.so’ >> /etc/php/7.4/cli/php.ini

安装 gmp 扩展过程中又报错 error: GNU MP Library version 4.2 or greater required.,又跑去安装 libgmp-dev 执行:

apt install libgmp-dev

然后顺利执行完上述步骤,接着执行:

chmod +x zephir
sudo ln -s /zephir/zephir /usr/local/bin/

安装 zephir-parser

git clone https://github.com/zephir-lang/php-zephir-parser.git
phpize
./configure –with-php-config=/usr/bin/php-config7.4
make
make install
echo ‘extension=zephir_parser’ >> /etc/php/7.4/cli/php.ini

到此 zephir 就安装完毕了。

打赏

本文固定链接: https://www.cxy163.net/archives/3135 | 绝缘体

该日志由 绝缘体.. 于 2022年05月16日 发表在 未分类 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: linux ubuntu 安装 zephir | 绝缘体
关键字: , , , ,

linux ubuntu 安装 zephir:等您坐沙发呢!

发表评论


快捷键:Ctrl+Enter