zoukankan      html  css  js  c++  java
  • php 在docker 中使用composer 报内存溢出的解决方法

    最近 需要用到有盟的推送,不想自己写,准备在github上面找个来改改,本地用的环境是docker 镜像,然后在docker 中 composer 时的时候,报了一个错

     docker exec -it www /bin/bash



    root@85c8ee9b5e27:/var/www/html/newyouchengdu# composer require lzg-xiyi/umengpush
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Using version ^1.0 for lzg-xiyi/umengpush
    ./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 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
    
    Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

    这个很明显的内存溢出错,怎么办,肯定 是改不限制内存

    https://stackoverflow.com/questions/49212475/composer-require-runs-out-of-memory-php-fatal-error-allowed-memory-size-of-161

    然后找到了解决方案

    root@85c8ee9b5e27:/var/www/html/newyouchengdu# php -d memory_limit=-1 /usr/local/bin/composer require lzg-xiyi/umengpush -vvv
    Reading ./composer.json
    Loading config file ./composer.json
    Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
  • 相关阅读:
    Java程序设计11——异常处理
    Hive安装及配置
    zookeeper集群安装(转)
    Linux网络服务管理命令
    Linux网络配置常用命令
    IP地址及子网掩码计算
    linux ftp、sftp、telnet服务开通、更改Orale最大连接数
    SQL多表连接
    用css伪类实现提示框效果
    关于DOM操作的性能优化
  • 原文地址:https://www.cnblogs.com/jackluo/p/13178092.html
Copyright © 2011-2022 走看看