【问题标题】:How to get past ImageMagick 7 on Windows 10 error to be compatible with Ruby on Rails?如何通过 Windows 10 上的 ImageMagick 7 错误以与 Ruby on Rails 兼容?
【发布时间】:2017-08-22 02:18:15
【问题描述】:

我正在尝试使用 Windows 10 64 位计算机正确安装 ImageMagick 7。我已确保下载 32 位版本的 ImageMagick,以便它与 Rails 兼容。我还将它们添加到列表顶部的环境变量和系统变量 PATH 中。当我运行convert -image 我得到invalid drive specification


我也不断收到此错误。

        *** 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
        --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=C:/RailsInstaller/Ruby2.3.0/bin/$(RUBY_BASE_NAME)
extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT)
        from extconf.rb:141:in `configure_compile_options'
        from extconf.rb:16:in `initialize'
        from extconf.rb:548:in `new'
        from extconf.rb:548:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/rmagick-2.16.0/gem_make.out

【问题讨论】:

    标签: ruby-on-rails ruby windows imagemagick windows-10


    【解决方案1】:

    在 Imagemagick 7 中,语法是

    magick inputimage.suffix outputimage.suffix
    

    根据您的评论没有减号(转换 -image)

    抱歉,我不是 Windows 用户,不知道如何在 Windows 10 上安装 IM。

    【讨论】:

      【解决方案2】:

      终于明白了!

      1. 下载 32 位版本的 ImageMagick
      2. 出现设置安装向导时,请务必选中“头文件”框和旧代码框
      3. 查找您的下载文件并确保它有可用的命令 exe 文件(这是 convert -image 需要运行的文件)
      4. 如果 ImageMagick 路径不存在,请将其添加到环境变量的顶部
      5. 打开一个命令并输入 convert -image,它现在应该可以工作了

      【讨论】:

        猜你喜欢
        • 2018-03-08
        • 2016-03-24
        • 1970-01-01
        • 2011-09-22
        • 2021-08-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-02-11
        相关资源
        最近更新 更多