Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install on Ubuntu 18.04 #197

Open
euglv opened this issue Sep 27, 2019 · 1 comment
Open

How to install on Ubuntu 18.04 #197

euglv opened this issue Sep 27, 2019 · 1 comment

Comments

@euglv
Copy link

euglv commented Sep 27, 2019

I have problems with installing node-imagemagick-native on Ubuntu 18.04.
I have added /usr/lib/x86_64-linux-gnu/ImageMagick-6.9.7/bin-q16 to the $PATH, but when I install imagemagick-native with npm I get the following error:

> imagemagick-native@1.9.3 install /home/node/panap/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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.15.0-55-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/node/panap/node_modules/imagemagick-native
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN apup@0.0.0 No repository field.
npm WARN apup@0.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-09-27T13_11_43_967Z-debug.log
@brainthinks
Copy link

I was just able to get it to install, here's what I had to do:

# Install the binaries
# (this is documented)
sudo apt-get install libmagick++-dev
# Make sure the compile step can find what it needs 
# (this is documented, though I had to change the command a little)
sudo ln -s $(ls /usr/lib/$(uname -p)-linux-gnu/ImageMagick-*/bin-q16/Magick++-config | head -n 1) /usr/local/bin
# I had to add the PKG_CONFIG_PATH env var manually (not documented)
# I had to install from the master branch (not documented, but is in another github issue)
PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/:$PKG_CONFIG_PATH yarn add elad/node-imagemagick-native#master

I hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants