3

我已经尝试了我在 git 上找到的所有 SO 和解决方案,但没有运气。我正在尝试在带有小牛的新 mbp 视网膜上的现有项目上运行捆绑安装。下面是我的踪迹:

Installing rmagick (2.13.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/***/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/clang... 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... no

Can't install RMagick 2.13.2. Can't find MagickWand.h.
*** 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.

冲泡医生输出

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

    /usr/local/bin/gpg-error-config
    /usr/local/bin/ksba-config
    /usr/local/bin/pkg-config

Warning: Your Homebrew is not installed to /usr/local
You can install Homebrew anywhere you want, but some brews may only build
correctly if you install in /usr/local. Sorry!

Warning: You have a non-Homebrew 'pkg-config' in your PATH:
  /usr/local/bin/pkg-config

`./configure` may have problems finding brew-installed packages using
this other pkg-config.
4

1 回答 1

5

@isea 和我在聊天中经历了这个。关键问题是:

  1. Homebrew 安装在非标准位置。一般来说,这是危险的。
  2. 卸载并重新安装 Homebrew 后,需要使用“brew install pkg-config”安装 pkg-config 软件包

这解决了这个问题。

于 2013-11-04T05:35:09.537 回答