2017-05-15 26 views
0

我正在嘗試安裝imagemagick-native。它會通過一個錯誤用linuxbrew安裝imagemagick-native節點

我正在使用命令進行安裝。

npm install imagemaick-native --save 

    > [email protected] 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 [email protected] No description 
npm WARN [email protected] No repository field. 
npm WARN [email protected] No license field. 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] 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到最新版本。 atill獲取sam錯誤。

回答

0

根據文件。

在安裝此模塊之前,先安裝帶有標題的ImageMagick。在CentOS 6和Mac OS X Lion,Ubuntu 12.04上使用ImageMagick 6.7.7進行測試。

brew install imagemagick 

sudo yum install ImageMagick-c++ ImageMagick-c++-devel 

sudo apt-get install libmagick++-dev 

確保你能找到Magick ++ - 在你的PATH配置。一些較新的發行版(例如Ubuntu 16.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-native 
+0

錯誤得到解決。謝謝你的回覆哥們。 –

+0

我歡迎:) –