Program Tip

Mountain Lion에 Rmagick 설치 오류

programtip 2020. 11. 12. 20:06
반응형

Mountain Lion에 Rmagick 설치 오류


Mountain Lion에 RMagick을 설치 하는 것과 같은 문제가있는 다른 사람들을 보았습니다. 그러나 제안 된 솔루션 중 어느 것도 rmagick을 성공적으로 설치할 수 없었습니다.

내가받는 오류 메시지는 다음과 같습니다.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
checking for Ruby version >= 1.8.5... yes
checking for /usr/local/bin/gcc-4.2... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
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.

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

내가 한 일 :

Installed XCode
Installed the command line tools
Installed XQuartz
Installed homebrew with imagemagick library
Installed most recent version of RVM
Symlinked GCC
Uninstalled and reinstalled both RVM and imagemagick

여전히 rmagick을 다운로드 할 수없는 이유가 있습니까?


Homebrew github repo ( https://github.com/mxcl/homebrew/issues/16625 )에서 rmagick 자체가 최신 버전의 imagemagick을 지원하지 않는다고 비난 하는 문제가보고 된 것 같습니다. 동일한 문제 ( https://github.com/mxcl/homebrew/issues/16625#issuecomment-11519383 )에서 실제로 저에게 도움이 된 https://coderwall.com/p/wnomjg 링크를 찾을 수 있습니다 . 이것이 그가하는 일입니다.

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

도움이 되었기를 바랍니다.


최신 버전의 rmagick (2.13.2)는 이제 imagemagick 6.8을 지원합니다.


우리가 한 일은 다음과 같습니다.

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

Imagemagick 6.7.7-6이 설치됩니다.


나는 이것이 오래되었다는 것을 알고 있지만 이러한 응답을 많이 겪었지만 여전히 작동하도록 할 수 없었습니다. 실제로 문제를 해결 한 다른 언어로 된 임의의 링크를 찾았습니다 ( http://sugiarto.webmuapp.com/Package_MagickCore_was_not_found_in_the_pkg_config_search_path ). 설정되지 않은 PKG_CONFIG_PATH를 찾고있는 것 같습니다.

나를 위해 일한 것 :

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

그런 다음 작동하는지 확인하십시오.

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

그런 다음 rmagick를 다시 설치하십시오.

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

성공! 이 문제가 여전히 다른 사람에게 도움이되기를 바랍니다.


다른 답변에서 :

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!


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.

참고URL : https://stackoverflow.com/questions/13942443/error-installing-rmagick-on-mountain-lion

반응형