gpt4 book ai didi

macos - 如何在 OS X 10.8.2 上安装 rmagic 2.13.1 和 imagemagick

转载 作者:行者123 更新时间:2023-12-04 15:23:41 24 4
gpt4 key购买 nike

我已经阅读了很多帖子,它们似乎都与在 OS X 上安装 rmagick gem 有关的问题有关,但是为 MagickCore 设置 PATH veriables 的解决方案似乎都不适合我。尝试安装 gem 时,我一直想出相同的堆栈跟踪。

这是我每次都得到的结果,我不知道如何克服它。

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

/Users/mwallace/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for 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... yes
checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.

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

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/mwallace/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-MagickCorelib
--without-MagickCorelib
--with-Magicklib
--without-Magicklib
--with-Magick++lib
--without-Magick++lib


Gem files will remain installed in /Users/mwallace/.rvm/gems/ruby-1.9.3-p194@recruittalk/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/mwallace/.rvm/gems/ruby-1.9.3-p194@recruittalk/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.

最佳答案

我遇到了同样的问题。我需要说的是,我对 Ruby、Rails、Homebrew(以及 Unix 文件结构)还很陌生……但是……

我怀疑一旦您解决了 PKG_CONFIG_PATH 问题,您就会遇到另一个问题。我会快速提出一个建议,可能对第一个建议有效,也可能无效,然后解释我对第二个建议做了什么。

首先,我在某个地方发现了将其添加到 .bashrc 的建议:PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"。几个小时前我做了这个,它可能已经解决了我的第一个问题。不过我记不太清了。

其次,我认为 imagemagick 版本 6.8 已弃用这些所需的方法:

checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no

所以较早的版本仍然会有它们。我按照此处的说明 (http://wearepandr.com/blog/article/homebrew-and-installing-old-package-versions) 安装旧版本的软件包。卸载 imagemagick 后,在/usr/local/Library/Formula/中运行建议的命令,并重新安装 imagemagick,我能够成功安装 rmagick gem。我随机选择了 6.7.1-1 种。

我真的认为有人应该更新 rmagick 以反射(reflect)对其依赖项的更改(它已经过时了一两年)。但我自己还不够了解。

关于macos - 如何在 OS X 10.8.2 上安装 rmagic 2.13.1 和 imagemagick,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14205369/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com