Не удается установить rmagick в Mountain Lion
Пробовал установить rmagick в Mountain Lion с помощью sudo gem install rmagick и получил следующее. Любая помощь приветствуется. Ни один из ответов форума не работал.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/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
checking for HDRI disabled version of ImageMagick... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.
Ответы
Ответ 1
Это сработало для меня...
Как указано в более ранних ответах:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
Я получил magicwand.sh:
$ mdfind MagickWand.h -->
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/MagickWand.h
Затем я вынул весь путь, кроме фактического имени файла, и добавил C_INCLUDE_PATH = eg:
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/
--->
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/
Затем я искал MagickCore.pc
$ mdfind MagickCore.pc
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/MagickCore.pc
То же самое для этого:
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
--->
PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
Затем я использовал эти два пути с установкой gem:
$ sudo C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/ PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/ gem install rmagick
И наконец он работал после нескольких часов исследований. Надеюсь, это поможет кому-то.
Ответ 2
Переустановите imagemagick с помощью Homebrew:
brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source
Или вы можете установить эту оболочку script::
https://github.com/maddox/magick-installer
Ответ 3
Я боролся с этим вопросом установки Rmagick on Mountain Lion некоторое время и пробовал МНОГИЕ различные решения, и это тот, который, наконец, помогло:
Переустановите imagemagick с помощью Homebrew:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
а затем
$ gem install rmagick -v '2.13.2'
Спасибо Andrew Nesbitt и Phillipe Gustavo за размещение и редактирование этого решения!
Ответ 4
Следующее разрешило это для меня:
brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source
cd /usr/local/Cellar/imagemagick/6.8.8-9/lib
ln -s libMagick++-6.Q16.3.dylib libMagick++.dylib
ln -s libMagickCore-6.Q16.2.dylib libMagickCore.dylib
ln -s libMagickWand-6.Q16.2.dylib libMagickWand.dylib
gem install rmagick -v '2.12.2'
источник: http://winstonyw.com/2013/03/21/installing-imagemagick-and-rmagick/