Error installing Rmagick on Mountain Lion

瘦欲@ 提交于 2019-11-28 15:19:11

It appears it's a problem reported on the Homebrew github repo (https://github.com/mxcl/homebrew/issues/16625) blaming rmagick itself not supporting newer versions of imagemagick. On that same issue (https://github.com/mxcl/homebrew/issues/16625#issuecomment-11519383), you can find this link: https://coderwall.com/p/wnomjg which actually worked for me. This is what he does:

cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
ln -s libMagick++-Q16.7.dylib   libMagick++.dylib
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib

Hope this helps.

Jeff Holland

What we did was the following:

cd /usr/local
git checkout 834ce4a Library/Formula/imagemagick.rb
brew install imagemagick

This will install Imagemagick 6.7.7-6

I know this is old, but I have been through a bunch of these responses and still wasn't able to get it to work. I found a random link in another language which actually solved the problem for me (http://sugiarto.webmuapp.com/Package_MagickCore_was_not_found_in_the_pkg_config_search_path). It looks like it was looking for PKG_CONFIG_PATH which was not set up.

What worked for me:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Then make sure it worked:

find /usr -name 'MagickCore.pc'
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/MagickCore.pc
/usr/local/lib/pkgconfig/MagickCore.pc

Then try installing rmagick again:

gem install rmagick
Building native extensions.  This could take a while...
Successfully installed rmagick-2.13.2
1 gem installed
Installing ri documentation for rmagick-2.13.2...
Installing RDoc documentation for rmagick-2.13.2...

Success! Hope this helps anyone else still running into this issue.

juanpastas

From other answers:

PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick gem install rmagick -v '2.13.1'

See https://stackoverflow.com/a/10645011/1197775 to know how to get these dirs.

Here is what worked for me on macOS Sierra.

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

I know this is a pretty old issue but it did happen to me recently. I am posting this for those that have tried all other answers and weren't able to resolve so far. Bumping the rmagick gem to version 2.13.4 has worked with Ruby 1.9.3 on MacOS.

Hope it helps!

mpapis

check my answer to openssl problem https://stackoverflow.com/a/13958931/497756 - just make sure that imagemagick was compiled including *.pc files - which is the default for most software but not all of it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!