문제

I'm trying to install rmagick on my Mac OS X v10.9 (Mavericks) machine. However. I get this error

/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... yes
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
Can't install RMagick 2.13.2. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.

The lines 41,17,50,53 in Magick-config are

--cflags)
  pkg-config --cflags MagickCore
  ;;
--cxxflags)
  pkg-config --cflags MagickCore
  ;;
--cppflags)
  pkg-config --cflags MagickCore
  ;;
--ldflags)
  pkg-config --libs MagickCore
  ;;
--libs)
  pkg-config --libs MagickCore
  ;;

I installed ImageMagick with brew install imagemagick --build-from-source and before running gem install rmagick, I set the path to MagickCore.pc with export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.9-1/lib/pkgconfig and the path to Wand.h with export C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.9-1/include/ImageMagick-6/.

This worked for the Wand, but not for MagickCore, as I still get pkg-config: command not found.

I use Ruby 1.9.3p545 and Ruby on Rails 3.2.16.

How can I fix this problem?

도움이 되었습니까?

해결책 2

Reinstalling pkg-config solved the issue for me.

다른 팁

I had the same issue with Rmagick after upgrading to Maverick. This solved it:

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

brew install pkg-config fixed this for me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top