gpt4 book ai didi

ruby - 无法安装 RMagick 2.13.2

转载 作者:数据小太阳 更新时间:2023-10-29 08:31:57 25 4
gpt4 key购买 nike

我在尝试安装 rmagick gem 时在 OS X Maverick 上遇到问题。以下是一些细节

ImageMagic 细节

mairs-MacBook-Pro:social-login-in-rails umair$ convert --version
Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-07-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib freetype jng jpeg ltdl lzma png xml zlib

我尝试使用路径和不使用路径进行安装,但我无法安装 rmagick。安装 rmagick 时出错

Umairs-MacBook-Pro:social-login-in-rails umair$ sudo C_INCLUDE_PATH=/opt/ImageMagick/include/ImageMagick-6/ PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ gem install rmagick
Building native extensions. This could take a while...
/Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr in PATH, mode 040777
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/Users/umair/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes

Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
/usr/local/bin/Magick-config reports version 6.8.9 Q16 is installed in /usr/local/Cellar/imagemagick/6.8.9-1
/opt/ImageMagick/bin/Magick-config reports version 6.8.8 Q16 is installed in /opt/ImageMagick
Using 6.8.9 Q16 from /usr/local/Cellar/imagemagick/6.8.9-1.

checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
/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.

*** 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/umair/.rvm/rubies/ruby-2.1.0/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/rmagick-2.13.2/gem_make.out

最佳答案

对于在 OSX Sierra 上使用自制软件安装 imagemagick 版本 7+ 时遇到此问题的任何人

您需要安装 imagemagick 版本 6 才能使 rmagick 正常工作。这 3 个命令对我有用。安装第 6 版的 imagemagick,然后强制链接。 bundle 安装 rmagick 之后应该可以正常工作。

$ brew install imagemagick@6

$ brew link imagemagick@6 --force

$ bundle install

在安装和链接到@6 之前,您可能需要brew uninstall imagemagick

关于ruby - 无法安装 RMagick 2.13.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24592310/

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