gpt4 book ai didi

ruby - 无法在 Windows 机器中安装 rmagick

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

我是 rmagick 和 ruby​​ 的新手。我使用的是 ruby​​ 1.8.6 版本

实际上我下载了 rmagic2.9.0 win32 版本并解压并安装了 imageMagic-6.4.8。然后在命令提示符下我给了 gem update --system。

C:\>gem update --system
Updating RubyGems
Nothing to update

然后

C:\>gem install rmagick --local
ERROR: could not find gem rmagick locally or in a repository

然后尝试给予

C:\>gem list --remote --all rmagick

*** REMOTE GEMS ***

rmagick (2.9.1, 2.9.0, 2.8.0, 2.7.2, 2.7.1, 2.7.0, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2
.4.0, 2.3.0, 2.2.2, 2.2.0, 2.1.0, 2.0.0, 1.15.17, 1.15.16, 1.15.15, 1.15.14, 1.1
5.13, 1.15.12, 1.15.11, 1.15.10, 1.15.9, 1.15.8, 1.15.7, 1.15.6, 1.15.5, 1.15.4,
1.15.3, 1.15.2, 1.15.1, 1.15.0, 1.14.1, 1.14.0, 1.13.0, 1.12.0, 1.11.1, 1.11.0,
1.10.1, 1.10.0, 1.9.3, 1.9.2, 1.9.1, 1.9.0, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.4,
1.7.3, 1.7.2, 1.7.1)
rmagick4j (0.3.7, 0.3.6, 0.3.5, 0.3.4, 0.3.3, 0.3.2, 0.3.1)

然后

C:\>gem install rmagick -win32 -v 2.9.0
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb
+----------------------------------------------------------------------------+
| This rmagick gem is for use only on Linux, BSD, OS X, and similar systems |
| that have a gnu or similar toolchain installed. The rmagick-win32 gem is a |
| pre-compiled version of RMagick bundled with ImageMagick for use on |
| Microsoft Windows systems. The rmagick-win32 gem is available on RubyForge.|
| See http://rmagick.rubyforge.org/install-faq.html for more 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
--srcdir=.
--curdir
--ruby=c:/ruby/bin/ruby


Gem files will remain installed in C:/n32/gems/rmagick-2.9.0 for inspection.
Results logged to C:/n32/gems/rmagick-2.9.0/ext/RMagick/gem_make.out

我无法安装 rmagick。谁能帮我解决这个问题?提前致谢。

最佳答案

你的问题在这里:

C:>gem install rmagick --local ERROR: could not find gem rmagick locally or in a repository

该命令必须从您解压缩 rmagick-win32 下载的目录运行。否则,gem 将无法找到它。

关于ruby - 无法在 Windows 机器中安装 rmagick,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/808657/

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