• 本帖最后由 usa 于 2018-12-17 13:11 编辑 *
  • root@mv:/www/wwwroot/express-ffmpeg# npm install
  • - > canvas@1.3.12 install /www/wwwroot/express-ffmpeg/node_modules/canvas
  • > node-gyp rebuild
  • - Package cairo was not found in the pkg-config search path.
  • Perhaps you should add the directory containing `cairo.pc'
  • to the PKG_CONFIG_PATH environment variable
  • No package 'cairo' found
  • gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in bindin g.gyp. while trying to load binding.gyp
  • gyp ERR! configure error
  • gyp ERR! stack Error: gyp failed with exit code: 1
  • gyp ERR! stack at ChildProcess.onCpExit (/www/server/nvm/versions/node/v8.8. 0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
  • gyp ERR! stack at emitTwo (events.js:125:13)
  • gyp ERR! stack at ChildProcess.emit (events.js:213:7)
  • gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:200:12)
  • gyp ERR! System Linux 4.12.9-041209-generic
  • gyp ERR! command "/www/server/nvm/versions/node/v8.8.0/bin/node" "/www/server/nv m/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.j s" "rebuild"
  • gyp ERR! cwd /www/wwwroot/express-ffmpeg/node_modules/canvas
  • gyp ERR! node -v v8.8.0
  • gyp ERR! node-gyp -v v3.6.2
  • gyp ERR! not ok
  • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@1.3.12 (node_modules/canv as):
  • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@1.3.12 install: node-gyp rebuild
  • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
  • - added 1 package in 2.796s
  • 复制代码

已经装了无数次了,而且跟他博客以及安装说明都试过,通过BT也搞过,依然出错,每次都是这里,到底什么情况。。。

最后更新:
问题已经解决,centos7 64bit安装,手动安装Nodejs pm2。。。。。。