红宝石 – Mac Rmagick不会安装Xcode 4.2
我刚刚获得了一个新的macbook pro,并试图设置我的开发环境。 我从应用商店下载了xcode 4.2并安装了它,之后我安装了自制软件和RVM。 ImageMagick,readline,ruby 1.9.3-head全部安装,直到我运行捆绑更新,试图安装rmagick。 经过很长时间的调查,我下定决心找不到libgomp。 输出是从gem安装rmagick是: $ gem install r
我刚刚获得了一个新的macbook pro,并试图设置我的开发环境。
我从应用商店下载了xcode 4.2并安装了它,之后我安装了自制软件和RVM。
ImageMagick,readline,ruby 1.9.3-head全部安装,直到我运行捆绑更新,试图安装rmagick。
$ gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for clang... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... *** 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/dhiemstra/.rvm/rubies/ruby-1.9.3-head/bin/ruby
/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
"clang -o conftest -I/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/include/ruby-1.9.1/ruby/backward -I/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/include/ruby-1.9.1 -I. -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -fopenmp conftest.c -L. -L/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/lib -L/usr/local/Cellar/imagemagick/6.7.1-1/lib -L/usr/X11/lib -L/usr/local/Cellar/imagemagick/6.7.1-1/lib -lMagickCore -llcms -ltiff -lfreetype -ljpeg -L/usr/X11/lib -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl -lruby.1.9.1 -lpthread -ldl -lobjc "
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
解决方法
我试过你的解决方案(充满希望),但它不适合我的不幸。
最后我设法通过重新安装imagemagick而无需openmp支持(这是负责lgomp的库)
brew install imagemagick --disable-openmp
原创声明
本站部分文章基于互联网的整理,我们会把真正“有用/优质”的文章整理提供给各位开发者。本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。