我正在尝试安装 canvas npm 模块,这是一个已知的麻烦制造者!它需要三个库:gif、jpeg 和 cairo。这基本上是一台新机器。让这些库可供 npm 使用的最佳方法是什么?
$ npm install canvas
npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
> canvas@0.12.1 preinstall node_modules/canvas
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /usr/local/lib/node
Checking for node prefix : ok /usr/local
Checking for library gif : not found
Checking for library jpeg : not found
Checking for cairo : not found
node_modules/canvas/wscript:30: error: the configuration failed (see 'node_modules/canvas/build/config.log')