无法安装Rmagick

时间:2017-02-02 08:37:11

标签: ruby-on-rails macos imagemagick rmagick

我正在mac系统中安装imagemagick version 7,我已使用命令brew install imagemagick安装了gem install rmagick,现在我正在执行Can't install RMagick 2.16.0. Can't find MagickWand.h. 但我收到以下错误。

export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"

我在我的bashfile中添加了>>>searchPattern = "Unit Of Measure" >>>replacePatter = "Unit of Measure" >>>sampleString = "not Unit Of measure, but Unit Of Measure and not Unit Of" >>>re.sub(searchPattern,replacePatter, sampleString) 'not Unit Of measure, but Unit of Measure and not Unit Of' 但没有运气

2 个答案:

答案 0 :(得分:1)

最后,我降级了imagemagick的版本以使其正常工作,即

brew uninstall imagemagick
brew uninstal imagemagick@6

然后,设置MagicWand&的路径。 MagicCore.h

export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick\@6/6.9.7-6/lib/pkgconfig/

答案 1 :(得分:0)

尝试卸载 ImageMagick 并使用--build-from-source选项重新安装,这样可以获得您寻找的标题:

brew rm imagemagick
brew install imagemagick --build-from-source <ANY OTHER OPTIONS>

现在检查一下:

find /usr -name "MagickWand.h"
/usr/local/Cellar/imagemagick/7.0.4-6/include/ImageMagick-7/MagickWand/MagickWand.h