ruby - 在 OS X 10.7.4 上安装 RSRuby 时找不到库

标签 ruby r rubygems

我正在尝试在我的 Mac 上安装 RSRuby。调用后:

sudo gem install rsruby

我收到此错误:

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

我正在使用 Mac OS X 10.7.4,并通过提供的 .pkg 安装了 R。

有什么想法吗?

最佳答案

对于处于相同情况的任何人,只需执行以下操作:

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

关于ruby - 在 OS X 10.7.4 上安装 RSRuby 时找不到库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13686769/

相关文章:

ruby - 创建卡片后无法使用 Trello webhook 获取信息卡片

ruby-on-rails - rails 5 : Search multiple models with Ransack

ruby - Rspec测试针对Docker容器失败

ruby-on-rails - `add_frozen_gem_path' : undefined method `source_index' for Gem:Module (NoMethodError) OR Gem. source_index 已弃用

mysql - 无法运行迁移

ruby - 为什么我的 RSpec 规范运行了两次?

r - Tidyverse、Rlang 和 tidyeval : Bang bang (! !) 内部函数失败,但它似乎无需引用即可工作

r - 在 igraph 数据框中查找与最大度关联的节点名称

r 将列表列转换为字符向量,其中列表是字符

ruby-on-rails - 尝试升级到 Rails 5 时,出现 "Bundler could not find compatible versions for gem "railties""错误