我正在尝试将我的应用程序部署到digitalocean
with dokku
。即使我已经 ssh'ed 到 digitalocean 机器并按照 wiki ( sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
) 中的说明运行命令来安装所有依赖项,我仍然收到以下错误:
-----> Building dependencies
Pruning any extraneous modules
Installing node modules (package.json)
> canvas@1.4.0 install /tmp/build/node_modules/canvas
> node-gyp rebuild
make: Entering directory `/tmp/build/node_modules/canvas/build'
SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
COPY Release/canvas-postbuild.node
CXX(target) Release/obj.target/canvas/src/Canvas.o
CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
In file included from ../src/CanvasPattern.cc:9:0:
../src/Image.h:19:21: fatal error: gif_lib.h: No such file or directory
#include <gif_lib.h>
^
compilation terminated.
make: *** [Release/obj.target/canvas/src/CanvasPattern.o] Error 1
make: Leaving directory `/tmp/build/node_modules/canvas/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/tmp/build/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-85-generic
gyp ERR! command "/tmp/build/.heroku/node/bin/node" "/tmp/build/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/build/node_modules/canvas
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
我用谷歌搜索了很多,唯一的解决方案是 install libgif-dev
,但我已经安装了它。那么有什么想法可能是错的吗?
规格:Ubuntu 14.04,dokku 0.6.3,节点 4.4.5,npm 2.15.5