I got errors installing composer-plugin-api under docker(在 docker 下安装 composer-plugin-api 时出错)
问题描述
In laravel 6 project under docker I switched to one of branches and made git pull for updates made by other developer But I got errors by running composer update :
- joshbrw/laravel-module-installer v1.0.1 requires composer-plugin-api ^2.0 -> no matching package found.
- joshbrw/laravel-module-installer v1.0.1 requires composer-plugin-api ^2.0 -> no matching package found.
- joshbrw/laravel-module-installer v1.0.0 requires composer-plugin-api ^2.0 -> no matching package found.
- Installation request for joshbrw/laravel-module-installer ^1.0 -> satisfiable by joshbrw/laravel-module-installer[v1.0.0, v1.0.1].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
...
In composer.lock I found
"joshbrw/laravel-module-installer": "^1.0",
and :
"require": {
"composer-plugin-api": "^2.0",
"php": "^5.4|7.*"
},
In composer.json I see:
"joshbrw/laravel-module-installer": "^1.0",
I tried to install composer-plugin-api. But I am not sure was it a correct decision ?
root@f32a029eae89:/app# composer require composer-plugin-api Using version ^1.1 for composer-plugin-api ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
I check memory:
root@f32a029eae89:/app# php -r "echo ini_get('memory_limit').PHP_EOL;"
1024M
root@f32a029eae89:/app# free
total used free shared buff/cache available
Mem: 8085248 5249464 1238412 159684 1597372 2372452
Swap: 2104476 905984 1198492
- Which is valid format for composer require package command with big value of memmory ?
I check composer in docker console :
root@f32a029eae89:/app# composer --version
Composer version 1.10.13 2020-09-09 11:46:34
joshbrw/laravel-module-installer v1.0.1 requires composer-plugin-api ^2.0 -> no matching package found.
You need composer 2 to install that package, and you are using composer 1.
If you are using the Composer docker image, you just need to add:
FROM composer:2 as composer
to the appropriate dockerfile. If you are downloading it manually, please make sure you download the appropriate version.
这篇关于在 docker 下安装 composer-plugin-api 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 docker 下安装 composer-plugin-api 时出错
基础教程推荐
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何替换eregi() 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
