首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用linuxbrew安装imagemagick-本机节点

用linuxbrew安装imagemagick-本机节点
EN

Stack Overflow用户
提问于 2017-05-15 05:17:38
回答 1查看 900关注 0票数 1

我正在尝试安装imagemagick本地软件。它会通过一个错误

我正在使用命令来安装。

代码语言:javascript
复制
 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更新为最新版本。就会得到山姆的错误。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-05-15 05:51:11

根据文件。

在安装此模块之前,使用标头安装ImageMagick。使用ImageMagick 6.7.7在CentOS 6和Mac,Ubuntu12.04上进行测试。

代码语言:javascript
复制
brew install imagemagick

代码语言:javascript
复制
sudo yum install ImageMagick-c++ ImageMagick-c++-devel

代码语言:javascript
复制
sudo apt-get install libmagick++-dev

确保您可以在您的路径中找到Magick++-config。一些较新发行版(如Ubuntu16.04)上的包可能缺少到/usr/bin的链接。如果是这样的话,就这么做。

代码语言:javascript
复制
sudo ln -s `ls /usr/lib/\`uname -p\`-linux-gnu/ImageMagick-*/bin-Q16/Magick++-config | head -n 1` /usr/local/bin/

那就做:

代码语言:javascript
复制
npm install imagemagick-native
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43971984

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档