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

Can't install RMagick 2.13.4. Can't find MagickWand.h #344

Open
voigt opened this issue Jan 14, 2015 · 23 comments

Comments

Projects
None yet
@voigt
Copy link

commented Jan 14, 2015

Hey,

I just tried to install Slogger but failed ;)
CLI Tools are installed - I also installed imagemagick via brew. I am not sure what MagickWand.h even is - so I hoped you have an idea how to make the engine running...

$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using addressable 2.3.6
Using buftok 0.2.0
Using safe_yaml 1.0.4
Using crack 0.4.2
Using thread_safe 0.3.4
Using descendants_tracker 0.0.4
Using diff-lcs 1.2.5
Using digest 0.0.1
Using equalizer 0.0.9
Using multipart-post 2.0.0
Using faraday 0.9.1
Using faraday_middleware 0.9.1
Using hpricot 0.8.6
Using simple-rss 1.3.1
Using feed-normalizer 1.5.2
Using hashie 3.3.2
Using http_parser.rb 0.6.0
Using http 0.5.1
Using multi_json 1.10.1
Using instagram 1.1.3
Using json 1.8.2
Using memoizable 0.4.2
Using mime-types 2.4.3
Using mini_portile 0.6.2
Using multimap 1.1.3
Using nokogiri 1.6.5
Using oauth 0.4.7
Using rack 1.6.0
Using rack-protection 1.5.3

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes
checking for xcrun... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
/usr/local/bin/Magick-config: line 41: pkg-config: command not found
/usr/local/bin/Magick-config: line 47: pkg-config: command not found
/usr/local/bin/Magick-config: line 50: pkg-config: command not found
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.4. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby


Gem files will remain installed in /Users/cv/.gem/ruby/2.0.0/gems/rmagick-2.13.4 for inspection.
Results logged to /Users/cv/.gem/ruby/2.0.0/gems/rmagick-2.13.4/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.4), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.4'` succeeds before bundling.

Kind regards,
Christoph

@coopermj

This comment has been minimized.

Copy link
Contributor

commented Jan 14, 2015

The rmagick is my fault — maybe I should have contributed the updated Gemfile with that gem commented out with a note to uncomment it if using my plugin. You can either comment out rmagick or try installing graphicsmagick as well.

On Jan 14, 2015, at 2:53 PM, Christoph Voigt <notifications@github.commailto:notifications@github.com> wrote:

Hey,

I just tried to install Slogger but failed ;)
CLI Tools are installed - I also installed imagemagick via brew. I am not sure what MagickWand.h even is - so I hoped you have an idea how to make the engine running...

$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using addressable 2.3.6
Using buftok 0.2.0
Using safe_yaml 1.0.4
Using crack 0.4.2
Using thread_safe 0.3.4
Using descendants_tracker 0.0.4
Using diff-lcs 1.2.5
Using digest 0.0.1
Using equalizer 0.0.9
Using multipart-post 2.0.0
Using faraday 0.9.1
Using faraday_middleware 0.9.1
Using hpricot 0.8.6
Using simple-rss 1.3.1
Using feed-normalizer 1.5.2
Using hashie 3.3.2
Using http_parser.rb 0.6.0
Using http 0.5.1
Using multi_json 1.10.1
Using instagram 1.1.3
Using json 1.8.2
Using memoizable 0.4.2
Using mime-types 2.4.3
Using mini_portile 0.6.2
Using multimap 1.1.3
Using nokogiri 1.6.5
Using oauth 0.4.7
Using rack 1.6.0
Using rack-protection 1.5.3

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

checking for Ruby version >= 1.8.5... yes
checking for xcrun... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
/usr/local/bin/Magick-config: line 41: pkg-config: command not found
/usr/local/bin/Magick-config: line 47: pkg-config: command not found
/usr/local/bin/Magick-config: line 50: pkg-config: command not found
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.4. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby

Gem files will remain installed in /Users/cv/.gem/ruby/2.0.0/gems/rmagick-2.13.4 for inspection.
Results logged to /Users/cv/.gem/ruby/2.0.0/gems/rmagick-2.13.4/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.4), and Bundler cannot continue.
Make sure that gem install rmagick -v '2.13.4' succeeds before bundling.

Kind regards,
Christoph


Reply to this email directly or view it on GitHubhttps://github.com//issues/344.

@voigt

This comment has been minimized.

Copy link
Author

commented Jan 14, 2015

I googled around and also installed brew install pkg-config, hence this seems to be necessary... Unfortunately it doesn't look much better. I put it to pastebin (more than 700 lines).

@voigt

This comment has been minimized.

Copy link
Author

commented Jan 15, 2015

The rmagick is my fault — maybe I should have contributed the updated Gemfile with that gem commented out with a note to uncomment it if using my plugin. You can either comment out rmagick or try installing graphicsmagick as well.
On Jan 14, 2015, at 2:53 PM, Christoph Voigt

Ah, who would have thought that its not necessary 😄 Thanks for your fast respone.
My Gemfile now:

source 'https://rubygems.org'

gem 'feed-normalizer'
gem 'twitter', '~> 5.3.0'
gem 'twitter_oauth'
gem 'json'
gem 'instagram'
gem 'sinatra'

gem 'nokogiri'
gem 'digest' # required for feedafever
gem 'sqlite3' # required for feedafever
#gem 'rmagick' # required for lastfmcovers
gem 'multimap' # required for olivetree

group :test do
  gem 'rake'
  gem 'rspec'
  gem 'vcr'
  gem 'webmock'
end
@mrjcleaver

This comment has been minimized.

Copy link

commented Jan 24, 2015

I too experienced this when installing (for the first time).

I've commented it out for now.

@maxgronlund

This comment has been minimized.

Copy link

commented Jan 26, 2015

found this
http://stackoverflow.com/questions/9050419/cant-install-rmagick-2-13-1-cant-find-magickwand-h

$ brew remove imagemagick
$ brew install imagemagick
Make sure pkg-config is correctly linked:

$ brew uninstall pkg-config
$ brew install pkg-config
$ brew unlink pkg-config && brew link pkg-config

$ gem install rmagick

@mrjcleaver

This comment has been minimized.

Copy link

commented Jan 26, 2015

Did that work for you @maxgronlund? I tried your steps but still see the same error.

@maxgronlund

This comment has been minimized.

Copy link

commented Jan 26, 2015

It did yes

Max

On 26/01/2015, at 15.51, Martin Cleaver notifications@github.com wrote:

Did that work for you @maxgronlund https://github.com/maxgronlund? I tried your steps but still see the same error.


Reply to this email directly or view it on GitHub #344 (comment).

@MarwoodChap

This comment has been minimized.

Copy link

commented Jan 31, 2015

Commenting out rmagick worked for me. When I try the steps in @maxgronlund 's post above it all works until I get to install rmagick. This fails due to permission errors.

@lepht

This comment has been minimized.

Copy link
Contributor

commented Feb 18, 2015

It looks like this is an issue with the current version of rmagick, 2.13.4.

Pinning the version to a previous version in the Slogger Gemfile fixes this issue for me while still allowing me to use 'lastfmcovers':

source 'https://rubygems.org'

gem 'feed-normalizer'
gem 'twitter', '~> 5.3.0'
gem 'twitter_oauth'
gem 'json'
gem 'instagram'
gem 'sinatra'

gem 'nokogiri'
gem 'digest' # required for feedafever
gem 'sqlite3' # required for feedafever
gem 'rmagick', '2.13.2' # required for lastfmcovers
gem 'multimap' # required for olivetree

group :test do
  gem 'rake'
  gem 'rspec'
  gem 'vcr'
  gem 'webmock'
end

lepht added a commit to lepht/Slogger that referenced this issue Feb 18, 2015

@RyanPMcD

This comment has been minimized.

Copy link

commented Mar 16, 2015

I had the same problem but was able to get it to work by following @maxgronlund steps. Thanks for the help!

@mithilesh20

This comment has been minimized.

Copy link

commented Mar 17, 2015

can anyone help me for the same issue for Ubuntu 14.04 OS.
When I am installing gem rmagick, I am getting follwoing error:

checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.4. Can't find MagickWand.h.
**\* extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
@abhiramm

This comment has been minimized.

Copy link

commented Mar 21, 2015

@mithilesh-kiprosh try installing, sudo apt-get install libmagickwand-dev. If this package is not getting installed, install this package -> libmagickcore-dev and then install the above.

@mithilesh20

This comment has been minimized.

Copy link

commented Mar 23, 2015

Thanks @abhiramm for your suggestion, but I have solved my problem.

@Amparose

This comment has been minimized.

Copy link

commented May 16, 2015

I got this to work via brew (#371) but then I receive the same error except for Tilt... do I have to install each of these gem individually?

@ttscoff

This comment has been minimized.

Copy link
Owner

commented May 16, 2015

I have no idea what half of these are for. First thing you should do is
determine which plugins the requirements are coming from and see if you
actually need them enabled. If so, and they aren't working with bundle install, then yes.

On 16 May 2015, at 10:39, Amparose wrote:

I got this to work via brew
(#371) but then I receive the
same error except for Tilt... do I have to install each of these gem
individually?


Reply to this email directly or view it on GitHub:
#344 (comment)

@vdunaev

This comment has been minimized.

Copy link

commented Jun 16, 2015

it helps for me
sudo apt-get install libmagickwand-dev

@Suanne

This comment has been minimized.

Copy link

commented Dec 9, 2015

@maxgronlund - Thanks a bunch!

Your solution worked for me as well - there were a couple of error's that popped up which I ignored but once I completed your steps I was able to finish installing the bundle.

@ka4a

This comment has been minimized.

Copy link

commented Aug 2, 2016

here's what i did on 16.04.1,
sudo apt-get install libmagickwand-dev
sudo apt-get install graphicsmagick-imagemagick-compat
PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH" gem install rmagick -v '2.13.2'

@chucklor

This comment has been minimized.

Copy link

commented Jul 27, 2017

Tried @maxgronlund steps and it didn't work for me.

Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

current directory: /Users/tom/.rvm/gems/ruby-2.3.3@app159/gems/rmagick-2.16.0/ext/RMagick

/Users/tom/.rvm/rubies/ruby-2.3.3/bin/ruby -r ./siteconf20170727-68819-1tjj1ia.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.16.0. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/tom/.rvm/rubies/ruby-2.3.3/bin/$(RUBY_BASE_NAME)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/tom/.rvm/gems/ruby-2.3.3@app159/extensions/x86_64-darwin-15/2.3.0/rmagick-2.16.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/tom/.rvm/gems/ruby-2.3.3@app159/gems/rmagick-2.16.0 for inspection.
Results logged to /Users/tom/.rvm/gems/ruby-2.3.3@app159/extensions/x86_64-darwin-15/2.3.0/rmagick-2.16.0/gem_make.out

@chucklor

This comment has been minimized.

Copy link

commented Jul 27, 2017

I tried:

sudo apt-get install libmagickwand-dev

and I got the sudo: apt-get: command not found message.

@diamantatos

This comment has been minimized.

Copy link

commented Feb 1, 2018

brew unlink imagemagick
brew install imagemagick@6 && brew link imagemagick@6 --force

@newmizanur

This comment has been minimized.

Copy link

commented Mar 2, 2018

At arch linux, after installing imagemagick@6, gem wasn't able to install package rmagick and got error below.

Can't install RMagick 2.16.0. Can't find MagickWand.h

Worked for me using below steps

  1. added pkgconfig path to .bashrc

    export PKG_CONFIG_PATH="/usr/lib/imagemagick6/pkgconfig"

  2. Created two symlinks as below

    ln -s /usr/include/ImageMagick-6/wand /usr/include/ImageMagick-6/wand

    ln -s /usr/local/include/ImageMagick/magick /usr/include/ImageMagick-6/magick

@graywolf-at-work

This comment has been minimized.

Copy link

commented Apr 23, 2019

On archlinux, imho easier is

$ CPPFLAGS=-I/usr/include/ImageMagick-6 gem install --user rmagick
Building native extensions. This could take a while...
Successfully installed rmagick-3.1.0
Parsing documentation for rmagick-3.1.0
Installing ri documentation for rmagick-3.1.0
Done installing documentation for rmagick after 1 seconds
1 gem installed

¯\_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.