简体   繁体   English

在Debian上安装Node-Canvas时出错

[英]Error when installing Node-Canvas on Debian

i got an error when i try to install the node-canvas modul. 当我尝试安装节点画布模块时出现错误。
Already checked the required packages and installed them. 已经检查了所需的软件包并安装了它们。 i've installed the following packages. 我已经安装了以下软件包。

apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g ++

Here is the error log: 这是错误日志:

canvas@1.1.6 install /DIR/node_modules/canvas
node-gyp rebuild



gyp ERR! configure error
    gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
    gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
    gyp ERR! stack at Object.self.commands.(anonymous function) as install
    gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
    gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
    gyp ERR! stack at ChildProcess.exithandler (child_process.js:723:7)
    gyp ERR! stack at ChildProcess.emit (events.js:110:17)
    gyp ERR! stack at maybeClose (child_process.js:1000:16)
    gyp ERR! stack at Socket. (child_process.js:1168:11)
    gyp ERR! stack at Socket.emit (events.js:107:17)
    gyp ERR! stack at Pipe.close (net.js:461:12)
    gyp ERR! System Linux 3.2.0-4-amd64
    gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /DIR/node_modules/canvas
    gyp ERR! node -v v0.13.0-pre
    gyp ERR! node-gyp -v v1.0.1
    gyp ERR! not ok

    npm ERR! canvas@1.1.6 install: node-gyp rebuild
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the canvas@1.1.6 install script.
    npm ERR! This is most likely a problem with the canvas package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR! npm owner ls canvas
    npm ERR! There is likely additional logging output above.
    npm ERR! System Linux 3.2.0-4-amd64
    npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas"
    npm ERR! cwd /DIR
    npm ERR! node -v v0.13.0-pre
    npm ERR! npm -v 1.4.28
    npm ERR! code ELIFECYCLE
    npm ERR! not ok code 0

Nodejs was outdated. Nodejs已过时。 Updating nodejs fixxed the Problem 更新nodejs解决了问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM