在 macOS 上安装 Composer 时出错(JIT 编译失败)

Errors installing Composer on macOS (JIT compilation failed)(在 macOS 上安装 Composer 时出错(JIT 编译失败))
本文介绍了在 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

在第 755 行PHP 警告:preg_match():JIT 编译失败:没有更多内存phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php在第 759 行

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

在线 759PHP 警告:preg_split():JIT 编译失败:没有更多内存phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php在第 654 行

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

在第 654 行PHP 警告:preg_split():JIT 编译失败:没有更多内存phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php在第 1091 行

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

在线 1091PHP 警告:preg_replace():JIT 编译失败:没有更多内存phar:///usr/local/bin/composer.phar/vendor/symfony/console/Formatter/OutputFormatter.php第 36 行

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

第 36 行

  [ErrorException]                                          
  preg_match_all(): JIT compilation failed: no more memory

推荐答案

这是一个已知的 PHP 7.3 bug,已经修复了.

This is a known PHP 7.3 bug, which has already been fixed.

作为临时解决方法,编辑您的 php.ini 文件(在我的情况下:vi/usr/local/etc/php/7.3/php.ini),通过更改禁用 PHP PCRE JIT 编译:

As a temporary workaround, 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 编译失败)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)