Problem installing Rstan on Mac 10.13.3


#1

Hi stan’s users,

I followed the description about installing rstan on Mac. However I didn’t install anything.
I got this error below :

fx <- inline::cxxfunction( signature(x = “integer”, y = “numeric” ),‘return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;’ )
/Library/Frameworks/R.framework/Resources/bin/Rcmd: line 38: sed: command not found
sh: make: command not found

ERROR(s) during compilation: source code errors or compiler configuration errors!

Program source:
1:
2: // includes from the plugin
3: #include <R.h>
4: #include <Rdefines.h>
5: #include <R_ext/Error.h>
6:
7:
8: // user includes
9:
10:
11: // declarations
12: extern “C” {
13: SEXP file31462e06c08( SEXP x, SEXP y) ;
14: }
15:
16: // definition
17:
18: SEXP file31462e06c08( SEXP x, SEXP y ){
19: return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
20: Rf_warning(“your C++ program does not return anything”);
21: return R_NilValue ;
22: }
23:
24:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! /Library/Frameworks/R.framework/Resources/bin/Rcmd: line 38: sed: command not found
sh: make: command not found
De plus : Warning message:
l’exécution de la commande ‘/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file31462e06c08.cpp 2> file31462e06c08.cpp.err.txt’ renvoie un statut 1

Could you help me how to do for that, please ?

Kind regards.


#2

What is the output of system("gcc --version") ?


#3

It helps if you’re more explicit about what you did. Did you install Xcode and the command line tools?


#4

Hi,
Yes, in fact I noticed I had download xcode beta. But after download xcode from itunes, everything works now.

Thank for you help.