簡體   English   中英

找不到ImageMagick版本-rmagick安裝失敗

[英]ImageMagick version cannot be found - rmagick install fails

超級困惑,是第一次使用Ruby的用戶...我已經安裝了rmagick,如下所示:

actionmailer (3.2.6)
actionpack (3.2.6)
activemodel (3.2.6)
activerecord (3.2.6)
activeresource (3.2.6)
activesupport (3.2.6)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.5)
cgi_multipart_eof_fix (2.5.0)
coderay (1.0.7)
erubis (2.7.0)
fastercsv (1.5.5)
gem_plugin (0.2.3)
hike (1.2.1)
i18n (0.6.0, 0.4.2)
journey (1.0.4)
json (1.7.5)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.19)
mocha (0.12.3)
mongrel (1.1.5 x86-mingw32)
mongrel_service (0.3.4 i386-mswin32)
multi_json (1.3.6)
mysql (2.8.1 x86-mingw32)
net-ldap (0.3.1)
pg (0.14.0 x86-mingw32)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.6)
railties (3.2.6)
rake (0.9.2.2)
rdoc (3.12)
rmagick (2.12.0 mswin32)
ruby-openid (2.1.8)
sprockets (2.1.3)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
win32-service (0.5.2 mswin32)

但是當我運行bundle install時 它給了我這個輸出。

Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.3.6) 
Using activesupport (3.2.6) 
Using builder (3.0.0) 
Using activemodel (3.2.6) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Using actionpack (3.2.6) 
Using mime-types (1.19) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.4.4) 
Using actionmailer (3.2.6) 
Using arel (3.0.2) 
Using tzinfo (0.3.33) 
Using activerecord (3.2.6) 
Using activeresource (3.2.6) 
Using bundler (1.1.5) 
Using coderay (1.0.7) 
Using fastercsv (1.5.5) 
Using json (1.7.5) 
Using metaclass (0.0.1) 
Using mocha (0.12.3) 
Using mysql (2.8.1) 
Using net-ldap (0.3.1) 
Using pg (0.14.0) 
Using rack-ssl (1.3.2) 
Using rdoc (3.12) 
Using thor (0.16.0) 
Using railties (3.2.6) 
Using rails (3.2.6) 
Using prototype-rails (3.2.1) 
Using ruby-openid (2.1.8) 
Using rack-openid (1.3.1) 
Installing rmagick (2.13.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

C:/wamp/ruby/bin/ruby.exe extconf.rb 
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** 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=C:/wamp/ruby/bin/ruby


Gem files will remain installed in C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.

請注意,我正在嘗試完成Redmine的安裝,並且需要rmagick才能繼續使用rake。

我的ruby版本是1.8.7,rubygem版本是1.3.7。 謝謝。

更新:

因此,在聽到我現有的rmagick是舊版本后,我運行了:

gem uninstall rmagick

並成功卸載了我現有的gem。 之后,我再次嘗試安裝捆綁軟件,但失敗與以前完全相同。

但是這一次我去了我的文件夾(C:\\ wamp \\ ruby​​ \\ lib \\ ruby​​ \\ gems \\ 1.8 \\ gems \\ rmagick-2.13.1),那里說文件仍然會被保存。 在那里我通過運行了一個新版本

gem build rmagick.gemspec

構建成功,所以我認為我們正在取得進展。 我跑了:

gem install rmagick-2.13.1.gem --platform=ruby -- --with-opt-lib=c:\ImageMagick\6.3.5-Q8\lib --with-opt-include=c:\ImageMagick\6.3.5-Q8\include

並得到以下輸出( 請注意,我不再獲得無效的驅動器,但這與之前相同 ):

checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** 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=C:/wamp/ruby/bin/ruby


Gem files will remain installed in C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

所以現在我正在研究為什么它不能確定ImageMagick版本...

盡管這可能無法完全回答問題...但是作為新手用戶,我可能在某個時候使安裝無聊。

回溯和卸載我之前安裝的所有內容,然后按照安裝說明再次解決了該問題。

請注意,這次甚至是說“雖然將來的版本也可以使用”的部分,但我指定的是本文撰寫時所提到的確切版本。

有一個舊版本的rmagick,盡管捆綁程序嘗試安裝一個新版本。 新版本的構建出了點問題。 您應該檢查日志文件以查找原因。

ImageMagick是RMagick用來處理圖像的本機庫。 您的ImageMagick安裝似乎有問題,並且RMagick無法檢測到您環境中安裝的ImageMagick版本。

在控制台上,當您鍵入“ identify”時,您是否有應用程序的輸出或只是找不到文件錯誤?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM