Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 未能安装rmagick_Ruby_Compilation_Rubygems_Compiler Errors - Fatal编程技术网

Ruby 未能安装rmagick

Ruby 未能安装rmagick,ruby,compilation,rubygems,compiler-errors,Ruby,Compilation,Rubygems,Compiler Errors,我的环境:rvmruby1.9.2,我从源代码构建ImageMagick 6.7.4-6 当我安装rmagick时,它会说: /home/rocky/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:在“try_do”中:编译器未能生成可执行文件。(运行时错误) 您必须首先安装开发工具 但是,我的rvm中也有ruby1.8.7,并且可以在1.8.7中正确安装rmagick。因此,我对1.9.2中遗漏的内容感到非常困惑。多亏了Michae

我的环境:
rvmruby1.9.2
,我从源代码构建
ImageMagick 6.7.4-6

当我安装rmagick时,它会说:

/home/rocky/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:在“try_do”中:编译器未能生成可执行文件。(运行时错误) 您必须首先安装开发工具


但是,我的rvm中也有ruby
1.8.7
,并且可以在1.8.7中正确安装rmagick。因此,我对1.9.2中遗漏的内容感到非常困惑。

多亏了Michael的回答,关键是用以下内容配置ImageMagick:

./configure--disable static--with modules--with perl--with magick plus--quantum depth=8

试着跟随

希望,你的环境是乌布图

sudo apt get安装libmagickwand dev


gem安装rmagick

我的回答是:可能会有帮助。听起来Ruby在找到GCC编译器时遇到了问题,因此无法编译rmagick源代码。您必须查看并了解如何设置,可能需要使用
setenv
。。。不确定。谢谢,不幸的是,我的环境是AndLinux。很长一段时间都没有更新。存储库只有一个非常旧的imagemagick,实际上,这就是为什么我需要从源代码处编译。