节点js + imagemagick +错误:产卵ENOENT

您好想要实现Imagemagick包使用node.js

我添加了我的下面的代码。

var im = require('imagemagick'); router.post('/conversation/start', function(req, res) { var args = ["/public/images/team/rajini.jpg", "-crop", "120x80+30+15", "output.png"]; im.convert(args, function(err) { if (err) { throw err; } res.end("Image crop complete"); }); }); 

但我在terminal得到以下错误。

 events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:988:11) at Process.ChildProcess._handle.onexit (child_process.js:779:34) npm ERR! weird error 8 npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian