简体   繁体   English

ruby on rails rmagick无法使用,cloud9

[英]ruby on rails rmagick can't use, cloud9

I am using cloud9. 我正在使用cloud9。

I want to use gem 'rmagick', but using bundle, following error message occurs... 我想使用gem'rmagick',但是使用bundle,会出现以下错误消息...

please help... 请帮忙...

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. Gem :: Ext :: BuildError:错误:无法构建gem本机扩展。

current directory: /usr/local/rvm/gems/ruby-2.4.0/gems/rmagick-2.16.0/ext/RMagick /usr/local/rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20180204-XXXXXX-oyXXpq.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. 当前目录:/usr/local/rvm/gems/ruby-2.4.0/gems/rmagick-2.16.0/ext/RMagick /usr/local/rvm/rubies/ruby-2.4.0/bin/ruby -r。 /siteconf20180204-XXXXXX-oyXXpq.rb extconf.rb正在检查gcc ...是正在检查Magick-config ...是否正在检查pkg-config ...是在pkg-config搜索路径中未找到软件包MagickCore。 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. 也许您应该将包含“ MagickCore.pc”的目录添加到PKG_CONFIG_PATH环境变量中没有找到检查过时的ImageMagick版本(<= 6.4.9)的软件包“ MagickCore” ... * extconf.rb失败*由于以下原因而无法创建Makefile:由于某些原因,可能缺少必要的库和/或标头。 Check the mkmf.log file for more details. 检查mkmf.log文件以获取更多详细信息。 You may need configuration options. 您可能需要配置选项。

I just spun up a Cloud9 VM and tried it. 我只是启动了Cloud9 VM并进行了尝试。

My Cloud9 VM I tried used yum as a package manager. 我尝试使用的Cloud9 VM使用yum作为程序包管理器。 Meaning I installed ImageMagick via sudo yum install ImageMagick-devel ... when I did that my gem install rmagick worked. 意思是我通过sudo yum install ImageMagick-devel ……当我完成我的gem install rmagick工作时。

Didn't try it with Bundler, but if gem install works then it should work in Bundler also. 没有在Bundler上尝试过,但是如果gem install可以工作,那么它也应该在Bundler中工作。

Using the command prompt install/update imagemagick via 使用命令提示符通过以下方式安装/更新imagemagick

sudo apt-get update

Then 然后

sudo apt-get install imagemagick

See more 查看更多

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM