这几天一直在倒腾composer,这个东西总是内存不够用,终于我把该装的装上了。
C:\www>composer require --prefer-dist yiisoft/yii2-jui "~2.0.0"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
VirtualAlloc() failed: [0x00000008] 存储空间不足,无法处理此命令。
VirtualAlloc() failed: [0x00000008] 存储空间不足,无法处理此命令。
PHP Fatal error: Out of memory (allocated 1025507328) (tried to allocate 201326600 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 83
Fatal error: Out of memory (allocated 1025507328) (tried to allocate 201326600 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 83
如果你也出现这样的情况以下是注意事项。
- 关闭xdebug
- 内存调到1g
- 把
composer.json
里面的版本按照composer.lock
里面的版本写死
做完上面三件事,你就会发现安装瞬间就完成了。