title: Can't install rmagick, pkg-config: command not found
body: <p>I'm trying to install rmagick on my <a href="http://en.wikipedia.org/wiki/OS_X_Mavericks" rel="nofollow noreferrer">Mac&nbsp;OS&nbsp;X v10.9</a> (Mavericks) machine. However. I get this error</p>
  
  <pre><code>/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.
  </code></pre>
  
  <p>The lines 41,17,50,53 in Magick-config are</p>
  
  <pre><code>--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
    ;;
  </code></pre>
  
  <p>I installed ImageMagick with <code>brew install imagemagick --build-from-source</code> and before running <code>gem install rmagick</code>, I set the path to MagickCore.pc with <code>export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.9-1/lib/pkgconfig</code> and the path to Wand.h with <code>export C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.9-1/include/ImageMagick-6/</code>.</p>
  
  <p>This worked for the Wand, but not for MagickCore, as I still get <code>pkg-config: command not found</code>.</p>
  
  <p>I use Ruby 1.9.3p545 and Ruby on Rails 3.2.16.</p>
  
  <p>How can I fix this problem?</p>