AWS Elastic Beanstalk为节点模块安装Poppler和Cairo

时间:2017-04-15 18:05:13

标签: node.js amazon-web-services elastic-beanstalk cairo poppler

我有一个使用此PDF库的节点应用程序:https://github.com/tpisto/pdf-fill-form

在安装说明中,您应该安装 sudo apt-get install libpoppler-qt5-dev libcairo2-dev

在默认的Beanstalk Amazon Linux发行版中,我无法使用apt-get,但我在amazon包回购中找到了poppler和cario。所以在我的.ebextensions配置中我有以下包

packages:
  yum:
    gcc: []
    poppler: []
    poppler-data: []
    cairo: []

但是当我部署时,npm安装失败了......任何想法如何让这些库工作,所以npm install来了吗?

在eb-activity.log中显示:

Package Qt5Core was not found in the pkg-config search path.
  Perhaps you should add the directory containing `Qt5Core.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'Qt5Core' found
  Package Qt5Gui was not found in the pkg-config search path.
  Perhaps you should add the directory containing `Qt5Gui.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'Qt5Gui' found
  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
  Package poppler-qt5 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `poppler-qt5.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'poppler-qt5' found
  gyp: Call to 'pkg-config --libs Qt5Core Qt5Gui cairo poppler-qt5' returned exit status 1. 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 (/opt/elasticbeanstalk/node-install/node-v0.12.6-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
  gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
  gyp ERR! System Linux 3.14.48-33.39.amzn1.x86_64
  gyp ERR! command "node" "/opt/elasticbeanstalk/node-install/node-v0.12.6-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd /tmp/deployment/application/node_modules/pdf-fill-form
  gyp ERR! node -v v0.12.6
  gyp ERR! node-gyp -v v2.0.1
  gyp ERR! not ok

0 个答案:

没有答案