2015-11-22 72 views
2

我正在尝试安装library(Boom)以进行贝叶斯面向对象建模及其依赖项BoomSpikeSlab, bsts。但是,我总是从R相同响应:在R上安装软件包,需要OSX支持C++ 11

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.5Xcode 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

我刚装它是没有问题的,是''install'在'man xcode-select'中记录为允许的开关? – Konrad

+0

嗨,不是,也许是因为'Xcode 5.1.0'? – Googme

回答

0

好,Boom是CRAN因此它由非常建筑必须努力使用默认的工具链。

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

+0

嗨德克,谢谢你的建议。我已经安装了'BH'。但是,'install.packages(“Boom”)'产生与上述相同的输出结果 – Googme

+0

是的,可以安装'dplyr'。使用'clang ++'。 'Boom'使用'clang ++ -std = C++ 11'。 – Googme

+0

这就是我之前告诉你的:_它在CRAN_上,所以它通过了非常严格的可构建性测试。如果它在你结束时失败了,你会首先看到你的setup_。 –