问题1
执行以下命令:
composer require sonata-project/doctrine-orm-admin-bundle "2.3.*"
报错:
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 32 bytes)
解决:
php -r "echo ini_get('memory_limit').PHP_EOL;" # 查看memory大小 COMPOSER_MEMORY_LIMIT=-1 composer require sonata-project/doctrine-orm-admin-bundle # 临时设置memory大小
参看官方说明(打开太慢了):
https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
问题2
but these conflict with your requirements or minimum-stability.
解决:在composer.json中添加以下
"minimum-stability": "dev",
切换composer国内镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
更多composer相关技术文章,请访问composer栏目://m.sbmmt.com/tool/composer/
以上就是composer的一些报错及解决办法的详细内容,更多请关注php中文网其它相关文章!
声明:本文转载于:csdn,如有侵犯,请联系admin@php.cn删除