ruby – 安装rmagick时发生错误

前端之家收集整理的这篇文章主要介绍了ruby – 安装rmagick时发生错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
尝试在 Windows Server 2008 R2上安装Redmine时,我收到以下错误.
  1. C:\Ruby\Apps\Redmine>rake db:migrate
  2. ←[31mCould not find gem 'rmagick (>= 2.0.0) x86-mingw32' in the gems available o
  3. n this machine.←[0m
  4. ←[33mRun `bundle install` to install missing gems.←[0m
  5.  
  6. C:\Ruby\Apps\Redmine>bundle install
  7. Fetching gem Metadata from http://rubygems.org/.......
  8. Using rake (0.9.2.2)
  9. Using i18n (0.6.1)
  10. Using multi_json (1.3.6)
  11. Using activesupport (3.2.8)
  12. Using builder (3.0.0)
  13. Using activemodel (3.2.8)
  14. Using erubis (2.7.0)
  15. Using journey (1.0.4)
  16. Using rack (1.4.1)
  17. Using rack-cache (1.2)
  18. Using rack-test (0.6.2)
  19. Using hike (1.2.1)
  20. Using tilt (1.3.3)
  21. Using sprockets (2.1.3)
  22. Using actionpack (3.2.8)
  23. Using mime-types (1.19)
  24. Using polyglot (0.3.3)
  25. Using treetop (1.4.10)
  26. Using mail (2.4.4)
  27. Using actionmailer (3.2.8)
  28. Using arel (3.0.2)
  29. Using tzinfo (0.3.33)
  30. Using activerecord (3.2.8)
  31. Using activeresource (3.2.8)
  32. Using bundler (1.2.1)
  33. Using coderay (1.0.7)
  34. Using fastercsv (1.5.5)
  35. Using rack-ssl (1.3.2)
  36. Using json (1.7.5)
  37. Using rdoc (3.12)
  38. Using thor (0.16.0)
  39. Using railties (3.2.8)
  40. Using jquery-rails (2.0.3)
  41. Using Metaclass (0.0.1)
  42. Using mocha (0.12.3)
  43. Using MysqL (2.8.1)
  44. Using net-ldap (0.3.1)
  45. Using pg (0.14.1)
  46. Using ruby-openid (2.1.8)
  47. Using rack-openid (1.3.1)
  48. Using rails (3.2.8)
  49. Installing rmagick (2.13.1) with native extensions
  50. Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
  51. .
  52.  
  53. C:/Ruby187/bin/ruby.exe extconf.rb
  54. checking for Ruby version >= 1.8.5... yes
  55. Invalid drive specification.
  56. Unable to get ImageMagick version
  57. *** extconf.rb Failed ***
  58. Could not create Makefile due to some reason,probably lack of
  59. necessary libraries and/or headers. Check the mkmf.log file for more
  60. details. You may need configuration options.
  61.  
  62. Provided configuration options:
  63. --with-opt-dir
  64. --without-opt-dir
  65. --with-opt-include
  66. --without-opt-include=${opt-dir}/include
  67. --with-opt-lib
  68. --without-opt-lib=${opt-dir}/lib
  69. --with-make-prog
  70. --without-make-prog
  71. --srcdir=.
  72. --curdir
  73. --ruby=C:/Ruby187/bin/ruby
  74.  
  75.  
  76. Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/rmagick-2.1
  77. 3.1 for inspection.
  78. Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/g
  79. em_make.out
  80. An error occurred while installing rmagick (2.13.1),and Bundler cannot continue
  81. .
  82. Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.

在尝试安装rmagick使用这个gem安装rmagick -v’2.13.1′

我收到这个错误

  1. C:\Ruby\Apps\Redmine>gem install rmagick -v 2.13.1
  2. Temporarily enhancing PATH to include DevKit...
  3. Building native extensions. This could take a while...
  4. ERROR: Error installing rmagick:
  5. ERROR: Failed to build gem native extension.
  6.  
  7. C:/Ruby187/bin/ruby.exe extconf.rb
  8. checking for Ruby version >= 1.8.5... yes
  9. Invalid drive specification.
  10. Unable to get ImageMagick version
  11. *** extconf.rb Failed ***
  12. Could not create Makefile due to some reason,probably lack of
  13. necessary libraries and/or headers. Check the mkmf.log file for more
  14. details. You may need configuration options.
  15.  
  16. Provided configuration options:
  17. --with-opt-dir
  18. --without-opt-dir
  19. --with-opt-include
  20. --without-opt-include=${opt-dir}/include
  21. --with-opt-lib
  22. --without-opt-lib=${opt-dir}/lib
  23. --with-make-prog
  24. --without-make-prog
  25. --srcdir=.
  26. --curdir
  27. --ruby=C:/Ruby187/bin/ruby
  28.  
  29.  
  30. Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/rmagick-2.1
  31. 3.1 for inspection.
  32. Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/g
  33. em_make.out

解决方法

尝试这个:
  1. apt-get install libmagickwand-dev
  2. gem install rmagick

猜你在找的Ruby相关文章