我正试图在我的本地机器上运行一个项目。我在Mac OS系统上安装了Ruby和Rails。它工作正常。我可以创建一个新的项目,并可以正确地运行它没有任何错误,但当我试图运行现有的项目时,它告诉我,我们必须bundle install
。当我运行该命令时,我得到以下错误:
"An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling."
当我运行gem install rmagick -v '2.13.2'
时,它给出了以下错误:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc-4.2... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
*** 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=/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rmagick-2.13.2 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
我已经找过了,也没有找到答案。
发布于 2014-06-03 10:40:28
对于Ubuntu,我使用了ff。基于此link
$ sudo apt-get install libmagick++-dev
发布于 2014-08-19 08:53:37
在mac上(以下代码在OSX Mavericks上有效):
brew install imagemagick
gem install rmagick
发布于 2017-11-23 09:12:15
在Mac上你可以尝试这样做:
$ brew unlink imagemagick
$ brew install imagemagick@6 && brew link imagemagick@6 --force
$ gem install rmagick
https://stackoverflow.com/questions/19274293
复制相似问题