无法安装rmagick,找不到pkg-config:命令 [英] Can't install rmagick, pkg-config: command not found

查看:1614
本文介绍了无法安装rmagick,找不到pkg-config:命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 Mac  OS  X v10.9 上安装rmagick (小牛队)机器。然而。我收到此错误

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.

Magick-config中的第41,17,50,53行是

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

我用安装了ImageMagick brew install imagemagick --build-from-source 在运行 gem install rmagick 之前,我将路径设置为MagickCore.pc,其中 export PKG_CONFIG_PATH = / usr / local / Cellar /imagemagick/6.8.9-1/lib/pkgconfig 和Wand.h的路径 export C_INCLUDE_PATH = / usr / local / Cellar / imagemagick / 6.8.9-1 / include / ImageMagick-6 /

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

这适用于魔杖,但不适用于MagickCore,因为我仍然得到 pkg-config:找不到命令

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

我使用Ruby 1.9.3p545和Ruby on Rails 3.2.16。

I use Ruby 1.9.3p545 and Ruby on Rails 3.2.16.

如何解决此问题?

推荐答案

重新安装 pkg -config 为我解决了这个问题。

Reinstalling pkg-config solved the issue for me.

这篇关于无法安装rmagick,找不到pkg-config:命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆