gpt4 book ai didi

ruby - 安装 rmagick 时出错 : ERROR: Failed to build gem native extension

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

我正在尝试使用以下命令安装 RmMagic:

gem install rmagick -v=2.12.2

运行此命令后出现一些错误:

Temporarily enhancing PATH to include DevKit...Building native extensions.  This could take a while...ERROR:  Error installing rmagick:        ERROR: Failed to build gem native extension.        D:/ruby/bin/ruby.exe extconf.rbchecking for Ruby version >= 1.8.5... yesInvalid drive specification.Unable to get ImageMagick version*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers.  Check the mkmf.log file for moredetails.  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=D:/ruby/bin/rubyGem files will remain installed in D:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.12.2 for inspection.Results logged to D:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.12.2/ext/RMagick/gem_make.out

请在这方面帮助我。提前致谢。

最佳答案

我在使用 rmagick 解决这个添加系统环境变量时遇到了同样的问题

CLASSPATH .;C:\ImageMagick-6.5.6-Q8\include

lib C:\ImageMagick-6.5.6-Q8\lib

然后做

gem install rmagick  --platform=ruby -- --with-opt-lib=C:\ImageMagick-6.5.6-Q8\lib --with-opt-include=C:\ImageMagick-6.5.6-Q8\include

关于ruby - 安装 rmagick 时出错 : ERROR: Failed to build gem native extension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10028320/

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