【问题标题】:start-stop-daemon error (Exec format error)start-stop-daemon error(执行格式错误)
【发布时间】:2014-09-30 09:09:54
【问题描述】:

此命令是 upstart 脚本的一部分,它曾经在 ubuntu 12.04、10.04 中工作。

sudo start-stop-daemon --start --make-pidfile --pidfile /var/run/mk_order_handler.pid --chuid ubuntu --exec /data2/src/jeapps/sites/crons_index.php workers/mk_order_handler

我刚刚将我的系统升级到 14.04 并且新贵脚本停止工作。当我手动执行 start-stop-daemon 命令时,我得到Exec format error

我能看到的唯一区别是,脚本被放置在一个单独的块设备中。会不会造成问题?我该如何解决这个错误?

【问题讨论】:

    标签: upstart ubuntu-14.04 start-stop-daemon


    【解决方案1】:

    您应该使用-- 将参数与可执行路径分开。

    结果是:

    start-stop-daemon --start --make-pidfile --pidfile /var/run/mk_order_handler.pid --chuid ubuntu --exec /data2/src/jeapps/sites/crons_index.php --workers/ mk_order_handler

    另外,我不知道你为什么使用sudo。 Upstart 作业以 root 身份运行,因此它们不需要sudo

    【讨论】:

      【解决方案2】:

      我刚才遇到了同样的问题,就我而言,这是因为我的脚本在第一行缺少#!/bin/bash

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-06-23
        • 2010-12-12
        • 1970-01-01
        • 1970-01-01
        • 2016-07-03
        • 2013-07-24
        相关资源
        最近更新 更多