首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rails rmagick错误Ubuntu c9.io

Rails rmagick错误Ubuntu c9.io
EN

Stack Overflow用户
提问于 2016-06-09 06:14:56
回答 1查看 148关注 0票数 0

我一直在寻找其他的rmagick线程来寻找一个好的解决方案。到目前为止,一切都没有奏效。

我正在做一个c9集成开发环境中的rails项目。我成功地通过'sudo apt get install imagemagick‘命令安装了imagemagick。

但是,当我尝试运行'gem install rmagick‘时,我得到以下错误

代码语言:javascript
复制
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/rmagick-2.15.4/ext/RMagick
/usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160608-3911-1hut05d.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found checking for outdated ImageMagick version (<= 6.4.9)... *** 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-2.3.0/bin/$(RUBY_BASE_NAME)

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

 /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/mkmf.log extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby 2.3.0/gems/rmagick-2.15.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/gem_make.out
EN

回答 1

Stack Overflow用户

发布于 2019-03-06 23:52:37

试试这个(适用于rmagick 3.0.0):

代码语言:javascript
复制
brew install imagemagick@6
brew link --force imagemagick@6
gem install rmagick
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37713851

复制
相关文章

相似问题

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