在R上安装软件包,需要C ++ 11支持OSX

时间:2015-11-22 18:37:37

标签: r macos c++11

我正在尝试为贝叶斯面向对象建模及其依赖项library(Boom)安装BoomSpikeSlab, bsts。但是,我始终从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’

我认为这可能与我的问题有关 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包?

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

1 个答案:

答案 0 :(得分:0)

好吧,Boom在CRAN上,所以它的构造必须与默认工具链一起工作

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