doukuanyong1939 2016-12-30 10:21
浏览 252

运行PHP bin / magento deploy:mode:set production我在magento 2.1上遇到错误

I am using php7 with nginx

Something went wrong while compiling generated code. See the error log for details.

Command returned non-zero exit code: /usr/bin/php7.0 -f /var/www/magento2/bin/magento setup:di:compile

  • 写回答

2条回答

  • dongyuan9292 2016-12-30 12:01
    关注

    try to run the failing command with the -vvv switch (for very verbose output).

    /usr/bin/php7.0 -f /var/www/magento2/bin/magento setup:di:compile -vvv
    

    with this command you should at least get a better error message than "an error occurred..."

    very likely, it's just the memory_limit being too low. You can increase the memory limit for a php process by adding the -d parameter to the php command:

    /usr/bin/php7.0 -d memory_limit=1G -f /var/www/magento2/bin/magento setup:di:compile
    

    if you run deploy:mode:set production, the compilation will be startet as a sub process and you can't increase the memory limit like this (since the parameter is not passed to the sub command)

    in this case, you have to increase the memory limit in your php configuration

    评论

报告相同问题?

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试