Library not found installing RSRuby on OS X 10.7.4

落花浮王杯 提交于 2019-12-10 11:11:22

问题


I'm trying to get RSRuby installed on my Mac. After calling:

sudo gem install rsruby

I am getting this error:

ERROR: Cannot find the R library, aborting.
*** 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
    --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/xxxxx/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
    --with-R-dir
    --with-R-include
    --without-R-include=${R-dir}/include
    --with-R-lib
    --without-R-lib=${R-dir}/lib
    --with-Rlib
    --without-Rlib

I'm working on Mac OS X 10.7.4 and I installed R through the .pkg provided.

Any idea?


回答1:


For anyone in the same situation just do as follows:

$ R_HOME=/Library/Frameworks/R.framework/Resources
$ gem install rsruby -- --with-R-dir=$R_HOME 



回答2:


I experienced this problem as I had not yet installed R on my mac(Yosemite). I did it using

$ brew tap homebrew/science 
$ brew install gcc
$ brew install Caskroom/cask/xquartz
$ brew install r



回答3:


I'm running OS X 10.9.4 and this worked for me.

export R_HOME=/Library/Frameworks/R.framework/Resources
gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=$R_HOME/include --with-R-lib=$R_HOME/lib


来源:https://stackoverflow.com/questions/13686769/library-not-found-installing-rsruby-on-os-x-10-7-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!