执行bundle install时RMagick 2.16.0安装失败求助
安装RMagick 2.16.0失败求助
我看过相关帖子并尝试了其中的解决方法,但问题仍存在,特此求助,提前感谢!
当执行DEPENDENCIES_NEXT=0 bundle install时,出现以下错误:
Can't install RMagick 2.16.0. Can't find MagickWand.h. *** 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=/Users/xxxxxxxxxxxx/.rvm/rubies/ruby-2.6.6/bin/$(RUBY_BASE_NAME) To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/xxxxxxxxxxxx/.rvm/gems/ruby-2.6.6@yyyyyyyyy/extensions/-darwin-22/2.6.0/rmagick-2.16.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/xxxxxxxxxxxx/.rvm/gems/ruby-2.6.6@yyyyyyyyy/gems/rmagick-2.16.0 for inspection. Results logged to /Users/xxxxxxxxxxxx/.rvm/gems/ruby-2.6.6@yyyyyyyyy/extensions/-darwin-22/2.6.0/rmagick-2.16.0/gem_make.out ...... ..... An error occurred while installing rmagick (2.16.0), and Bundler cannot continue. In Gemfile: gruff was resolved to 0.7.0, which depends on rmagick
我尝试重新安装并重新链接ImageMagick,操作已成功执行:
yyyyyyyyy@bcd074b3401b xxxxxx % brew unlink imagemagick@6 Unlinking /opt/homebrew/Cellar/imagemagick@6/6.9.13-4... 0 symlinks removed. yyyyyyyyy@bcd074b3401b xxxxxx % brew link --force imagemagick@6 Linking /opt/homebrew/Cellar/imagemagick@6/6.9.13-4... 76 symlinks created. If you need to have this software first in your PATH instead consider running: echo 'export PATH="/opt/homebrew/opt/imagemagick@6/bin:$PATH"' >> ~/.zshrc
执行gem install rmagick可成功安装rmagick-5.3.0,但这无法解决当前问题。
我认为根本原因是gem默认安装rmagick-5.3.0,而安装2.16.0时会出现与bundle相同的错误。我的gem版本为3.0.9,系统为MacOS Ventura M1 Pro。
内容的提问来源于stack exchange,提问作者user8142520
相关产品推荐
相关产品推荐

