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 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试