在macOS上安装Composer时出错(JIT编译失败) [英] Errors Installing Composer on macOS (JIT compilation Failed)
本文介绍了在macOS上安装Composer时出错(JIT编译失败)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在macOS终端中运行composer --version
时,出现以下错误:
When I run composer --version
in the macOS terminal I get the following errors:
PHP警告:preg_match():JIT编译失败:内存不足 phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php 在755行
PHP Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 755
Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 755
PHP Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 759
Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 759
PHP Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 654
Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 654
PHP Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 1091
Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 1091
PHP Warning: preg_replace(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Formatter/OutputFormatter.php on line 36
Warning: preg_replace(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Formatter/OutputFormatter.php on line 36
[ErrorException]
preg_match_all(): JIT compilation failed: no more memory
推荐答案
This is a known PHP 7.3 bug.
作为临时解决方案,请编辑您的php.ini文件(在我的情况下为vi /usr/local/etc/php/7.3/php.ini
),并通过以下操作禁用PHP PCRE JIT编译:
As a temporary fix, edit your php.ini file (in my case: vi /usr/local/etc/php/7.3/php.ini
), disable PHP PCRE JIT compilation by changing:
;pcre.jit=1
到
pcre.jit=0
这篇关于在macOS上安装Composer时出错(JIT编译失败)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文