Slogger icon indicating copy to clipboard operation
Slogger copied to clipboard

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

Open voigt opened this issue 10 years ago • 26 comments

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

voigt avatar Jan 14 '15 19:01 voigt

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 <[email protected]mailto:[email protected]> 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/ttscoff/Slogger/issues/344.

coopermj avatar Jan 14 '15 21:01 coopermj

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 avatar Jan 14 '15 21:01 voigt

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 :smile: 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

voigt avatar Jan 15 '15 16:01 voigt

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

I've commented it out for now.

mrjcleaver avatar Jan 24 '15 14:01 mrjcleaver

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

maxgronlund avatar Jan 26 '15 14:01 maxgronlund

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

mrjcleaver avatar Jan 26 '15 14:01 mrjcleaver

It did yes

Max

On 26/01/2015, at 15.51, Martin Cleaver [email protected] 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 https://github.com/ttscoff/Slogger/issues/344#issuecomment-71471684.

maxgronlund avatar Jan 26 '15 15:01 maxgronlund

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.

MarwoodChap avatar Jan 31 '15 22:01 MarwoodChap

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 avatar Feb 18 '15 00:02 lepht

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

RyanPMcD avatar Mar 16 '15 01:03 RyanPMcD

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.

mithilesh20 avatar Mar 17 '15 11:03 mithilesh20

@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.

abhiramm avatar Mar 21 '15 19:03 abhiramm

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

mithilesh20 avatar Mar 23 '15 06:03 mithilesh20

I got this to work via brew (https://github.com/ttscoff/Slogger/issues/371) but then I receive the same error except for Tilt... do I have to install each of these gem individually?

Amparose avatar May 16 '15 15:05 Amparose

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 (https://github.com/ttscoff/Slogger/issues/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: https://github.com/ttscoff/Slogger/issues/344#issuecomment-102640481

ttscoff avatar May 16 '15 19:05 ttscoff

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

mrsmtvd avatar Jun 16 '15 08:06 mrsmtvd

@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.

Suanne avatar Dec 09 '15 15:12 Suanne

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'

ka4a avatar Aug 02 '16 12:08 ka4a

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 avatar Jul 27 '17 18:07 chucklor

I tried:

sudo apt-get install libmagickwand-dev

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

chucklor avatar Jul 27 '17 18:07 chucklor

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

diamantatos avatar Feb 01 '18 10:02 diamantatos

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

newmizanur avatar Mar 02 '18 06:03 newmizanur

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

¯\_(ツ)_/¯

graywolf-at-work avatar Apr 23 '19 11:04 graywolf-at-work

facing issues while installing rmagick. Getting error " rmagick requires Ruby version >= 2.3.0. " but I already having installed version 2.6.3. Kindly assist

[redmine@ip-1x2-20-xxx-xx redmine]$ sudo gem install rmagick ERROR: Error installing rmagick: rmagick requires Ruby version >= 2.3.0. [redmine@ip-1x2-20-xxx-xx redmine]$ ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux] [redmine@ip-1x2-20-xxx-xx redmine]$

Shash1i avatar Jun 09 '19 10:06 Shash1i

Kindly assist, I am trying to set up Redmine on my centos server but while executing the command: bundle install --without development test postgresql sqlite getting the following attached error, I am struggling from a long time but still didn't able to found any working solution

vi /home/redmine/.rvm/gems/ruby-2.6.3/extensions/x86_64-linux/2.6.0/rmagick-2.16.0/mkmf.log

find_executable: checking for gcc... -------------------- yes


find_executable: checking for Magick-config... -------------------- no


find_executable: checking for pkg-config... -------------------- yes


Detected ImageMagick version: nil versions are discouraged and will be deprecated in Rubygems 4 Can't install RMagick 2.16.0. You must have ImageMagick 6.4.9 or later. Can't install RMagick 2.16.0. You must have ImageMagick 6.4.9 or later.

Shash1i avatar Jun 09 '19 10:06 Shash1i

thanks @ka4a this worked on a legacy ruby:2.0 docker image:

RUN  PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH" bundle install

snackycracky avatar Nov 27 '19 19:11 snackycracky