Reputation: 1712
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?
Upvotes: 2
Views: 588
Reputation: 2525
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
Upvotes: 1
Reputation: 11
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
Upvotes: 0
Reputation: 1712
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
Upvotes: 3