gpt4 book ai didi

php - 为什么 Composer 不使用 OPcache?

转载 作者:行者123 更新时间:2023-12-01 09:44:50 25 4
gpt4 key购买 nike

我加了

"require": {
"ext-opcache": "*",

composer.json对于 eDirectory Symfony 2.8 应用程序,但它给了我一个错误:
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested PHP extension ext-opcache * is missing from your system. Install or enable PHP's opcache extension.

但是,我确实安装了 OPcache!
$ php -r "phpinfo();" | grep OPcache -a3
Zend OPcache

Opcode Caching => Up and Running
Optimization => Enabled

它不会提示 "ext-gd": "*""ext-mbstring": "*" .

PHP 5.6.27

最佳答案

扩展名是 Zend OPcache不是 OPcache .您需要使用全名来要求它:

"ext-zend-opcache": "*"

关于php - 为什么 Composer 不使用 OPcache?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51447950/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com