【发布时间】:2020-11-19 08:29:13
【问题描述】:
我使用 composer 来安装 pimcore。现在我正在尝试为我正在使用的新主题添加路由,但我遇到了路由错误。基于symfony's documentation,我意识到我需要运行composer require annotations,但我遇到了这个错误:
[InvalidArgumentException]
Could not find package annotations.
Did you mean one of these?
minime/annotations
zeptech/annotations
ray/di
jms/metadata
jms/aop-bundle
环顾四周后,我发现我首先需要运行composer require sensio/framework-extra-bundle。但是,当我运行它时,一段时间后,我会被击中
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 2929729536) (tried to allocate 4096 bytes) in
phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Fatal error: Out of memory (allocated 2929729536) (tried to allocate 4096 bytes) in
phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
我意识到这是一个内存问题,服务器上当前有 3GB 内存(通过 DigitalOcean 运行)。我有哪些选择?运行 Ubuntu 16.04 顺便说一句。
我应该补充一点,我在 php.ini 中的内存限制设置为 -1。
【问题讨论】:
-
我在尝试运行
composer update时也遇到同样的内存错误
标签: symfony memory composer-php pimcore