bethyao 2014-12-02 12:31 采纳率: 0%
浏览 3052

ubuntu node 安装 canvas不成功

用npm安装canvas用的这两句代码sudo apt-get install libcairo2-dev和npm install canvas
出现错误
sh: 1: node-waf: not found

npm ERR! canvas@0.10.2 preinstall: node-waf configure build
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the canvas@0.10.2 preinstall 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-waf configure build
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.8.0-29-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! cwd /home/baobao/baobao/spriter
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
root@ubuntu:/home/baobao/baobao/spriter#
已经好几天,在线等,希望有懂的人告诉我

  • 写回答

1条回答

  • Rocloud 2014-12-02 13:48
    关注

    npm install canvas 各种依赖,各种错误 转投npm install ccap 来生成验证码

    他的依赖很多,最好按照官方wiki提供的文档来安装.
    wiki文档地址: https://github.com/LearnBoost/node-canvas/wiki

    wiki 提供的安装向导包括2部分,红框内的为不同操作系统需要安装的依赖. 红框下面是云环境需要安装的依赖.
    其实我在博客中只是想生成一个验证码,涉及到的功能很小,于是网上查找替换方案,就这样发现了ccap ,眼前一亮的感觉!

    以上转载

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型