首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装宝石rmagick

无法安装宝石rmagick
EN

Stack Overflow用户
提问于 2022-10-03 11:42:14
回答 1查看 123关注 0票数 1

我试图在一台新mac上安装rmagick,运行montaray 12

我安装了rbenv、bundler等,现在正在运行bundle安装

代码语言:javascript
复制
Installing rmagick 4.2.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/will/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rmagick-4.2.4/ext/RMagick
/Users/will/.rbenv/versions/2.7.5/bin/ruby -I /Users/will/.rbenv/versions/2.7.5/lib/ruby/2.7.0 -r
./siteconf20221003-4792-u83yc4.rb extconf.rb
checking for brew... yes
checking for Ruby version >= 2.3.0... yes
checking for pkg-config... yes


ERROR: Can't install RMagick 4.2.4. Can't find ImageMagick with pkg-config


*** 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=/Users/will/.rbenv/versions/2.7.5/bin/$(RUBY_BASE_NAME)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/will/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0/rmagick-4.2.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/will/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/rmagick-4.2.4 for
inspection.
Results logged to
/Users/will/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0/rmagick-4.2.4/gem_make.out

An error occurred while installing rmagick (4.2.4), and Bundler cannot continue.
Make sure that `gem install rmagick -v '4.2.4' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rmagick

我已经安装了pkg-config和imagemagick@6。

我跟踪了各种这样的答案来调试,但是没有任何效果。我该怎么安装rmagick?

更新我/Users/will/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0/rmagick-4.2.4/mkmf.log文件的内容-

代码语言:javascript
复制
find_executable: checking for brew... -------------------- yes

--------------------

assert_minimum_ruby_version!: checking for Ruby version >= 2.3.0... -------------------- yes

--------------------

find_executable: checking for pkg-config... -------------------- yes

--------------------

ERROR: Can't install RMagick 4.2.4. Can't find ImageMagick with pkg-config
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-03 13:18:34

目前,与安装的“高速公路”有冲突。

安装rmagick的解决办法

代码语言:javascript
复制
brew install pkg-config imagemagick
brew  uninstall highway
bundle install
brew install highway

https://github.com/rmagick/rmagick/issues/1153

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73934924

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档