我正在尝试安装imagemagick本地软件。它会通过一个错误
我正在使用命令来安装。
npm install imagemaick-native --save
> imagemagick-native@1.9.3 install /home/kspx/Desktop/MyData/Projects/Node/vcc-api/node_modules/imagemagick-native
> node-gyp rebuild
/bin/sh: 1: Magick++-config: not found
gyp: Call to 'Magick++-config --ldflags --libs' returned exit status 127 while in binding.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 (/home/kspx/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
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:211:12)
gyp ERR! System Linux 4.4.0-75-generic
gyp ERR! command "/usr/bin/nodejs" "/home/kspx/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/kspx/Desktop/MyData/Projects/Node/vcc-api/node_modules/imagemagick-native
gyp ERR! node -v v4.8.3
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
WARN VinCompass@0.0.1 No description
npm WARN VinCompass@0.0.1 No repository field.
npm WARN VinCompass@0.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! imagemagick-native@1.9.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the imagemagick-native@1.9.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the imagemagick-native package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs imagemagick-native
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls imagemagick-native
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kspx/.npm/_logs/2017-05-15T05_30_58_940Z-debug.log伙计们,请给我解决办法。我怎样才能解决这个问题?我试过所有的ubuntu常客。甚至我也将节点和npm更新为最新版本。就会得到山姆的错误。
发布于 2017-05-15 05:51:11
根据文件。
在安装此模块之前,使用标头安装ImageMagick。使用ImageMagick 6.7.7在CentOS 6和Mac,Ubuntu12.04上进行测试。
brew install imagemagick或
sudo yum install ImageMagick-c++ ImageMagick-c++-devel或
sudo apt-get install libmagick++-dev确保您可以在您的路径中找到Magick++-config。一些较新发行版(如Ubuntu16.04)上的包可能缺少到/usr/bin的链接。如果是这样的话,就这么做。
sudo ln -s `ls /usr/lib/\`uname -p\`-linux-gnu/ImageMagick-*/bin-Q16/Magick++-config | head -n 1` /usr/local/bin/那就做:
npm install imagemagick-nativehttps://stackoverflow.com/questions/43971984
复制相似问题