在R上安装软件包,需要OSX的C ++ 11支持 [英] Installing package on R, need C++11 support for OSX

查看:166
本文介绍了在R上安装软件包,需要OSX的C ++ 11支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为贝叶斯面向对象建模及其依赖项BoomSpikeSlab, bsts安装library(Boom).但是,我总是从R获得相同的响应:

I'm trying to install library(Boom) for Bayesian Object Oriented Modeling and its dependencies BoomSpikeSlab, bsts. However, I always get the same response from R:

In file included from Models/Glm/MultinomialLogitModel.cpp:31:
In file included from     ../inst/include/Models/Glm/PosteriorSamplers/MLVS.hpp:25:
In file included from     ../inst/include/Models/Glm/PosteriorSamplers/MLVS_data_imputer.hpp:25:
../inst/include/Models/PosteriorSamplers/Imputer.hpp:30:10: fatal     error: 'future' file not found
#include <future>
     ^
 1 error generated.
 make: *** [Models/Glm/MultinomialLogitModel.o] Error 1
ERROR: compilation failed for package ‘Boom’
* removing ‘/usr/local/lib/R/3.2/site-library/Boom’
Warning in install.packages :
installation of package ‘Boom’ had non-zero exit status
 ERROR: dependency ‘Boom’ is not available for package ‘BoomSpikeSlab’
 * removing ‘/usr/local/lib/R/3.2/site-library/BoomSpikeSlab’
Warning in install.packages :
 installation of package ‘BoomSpikeSlab’ had non-zero exit status
 ERROR: dependencies ‘BoomSpikeSlab’, ‘Boom’ are not available for     package ‘bsts’
* removing ‘/usr/local/lib/R/3.2/site-library/bsts’
  Warning in install.packages :
installation of package ‘bsts’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/s2/9wz53mrj0vqcpj9v3zjwx6q80000gn/T/RtmpvMmIug/downloaded_packages’

我认为这可能与我的问题有关 在osx上安装pip cffi软件包失败

I thought that might be related to my problem pip cffi package installation failed on osx

所以我尝试了:

xcode-select --install

导致:

xcode-select: Error: unknown command option '--install'.

xcode-select: Report or change the path to the active
          Xcode installation for this machine.

Usage: xcode-select --print-path
       Prints the path of the active Xcode folder
  or: xcode-select --switch <xcode_path>
       Sets the path for the active Xcode folder
  or: xcode-select --version
       Prints the version of xcode-select

如何安装Boom软件包?

我在Xcode version: 5.1.0中使用Mac OSX 10.8.5 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin12.6.0

推荐答案

好吧,

Well, Boom is on CRAN so it by that very construction must work with the default toolchain.

您是否已安装 BH ?当我们在 Rcpp中添加了可选 C ++ 11支持时,相应的clang版本已经工作了多年. 至少早在2013年3月(当我们添加了对Rcpp::plugin(cpp11)的支持时.

Do you have BH installed? The corresponding clang version worked for years as we added optional C++11 support in Rcpp at least as early as March 2013 (when we added support for Rcpp::plugin(cpp11).

这篇关于在R上安装软件包,需要OSX的C ++ 11支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆