簡體   English   中英

在Debian上安裝Node-Canvas時出錯

[英]Error when installing Node-Canvas on Debian

當我嘗試安裝節點畫布模塊時出現錯誤。
已經檢查了所需的軟件包並安裝了它們。 我已經安裝了以下軟件包。

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

這是錯誤日志:

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已過時。 更新nodejs解決了問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM