Rails:安装 rmagick 时出错

编程入门 行业动态 更新时间:2024-10-20 09:29:36
本文介绍了Rails:安装 rmagick 时出错 - 错误:无法构建 gem 本机扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试在本地机器上运行一个项目.我在 Mac OS 系统上安装了 Ruby 和 Rails.它工作正常.我可以创建一个新项目并且可以正常运行它而不会出现任何错误,但是当我尝试运行现有项目时,它说我们必须bundle install.当我运行该命令时,出现以下错误:

I am trying to run one project on my local machine. I installed Ruby and Rails on my Mac OS system. It is working properly. I can create a new project and can run it properly without any error, but when I try to run the existing project it says that we have to bundle install. When I run that command I get the following error:

"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' 时,它给了我以下错误:

When I run gem install rmagick -v '2.13.2' it gives me the following error:

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

我已经搜索过,但没有在任何地方找到答案.

I have searched and did not find an answer anywhere.

推荐答案

对于 Ubuntu,我使用了 ff.基于此链接:

For Ubuntu, I used the ff. based on this link:

$ sudo apt-get install libmagick++-dev

更多推荐

Rails:安装 rmagick 时出错

本文发布于:2023-10-15 03:02:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1493049.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Rails   rmagick

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!