I’ve used the online tutorial to install RStan. I’m currently using Catalina and studio, which is posing a problem that I suspect others have encountered. I’ve installed Rcpp, Xcode, but when I install Stan this route (install.packages(“rstan”, type = “source”))
clang: error: no such file or directory: ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/lib//libStanServices.a’
make: *** [rstan.so] Error 1
make: *** Waiting for unfinished jobs…
26 warnings generated.
ERROR: compilation failed for package ‘rstan’
- removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan’
Warning in install.packages :
installation of package ‘rstan’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/t5/z6n7fqts5sldmfy1m6f9myqr0000gs/T/RtmpWaj6Od/downloaded_packages’
require(rstan)
Loading required package: rstan
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘rstan’
When I install from GitHub (install.packages(“Rcpp”, repos = “Rcpp Drat”) I get similar errors:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Sparse:33:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/IterativeLinearSolvers:46:
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
#pragma clang diagnostic pop
^
13 warnings and 14 errors generated.
make: *** [barrier.o] Error 1
make: *** Waiting for unfinished jobs…
13 warnings and 14 errors generated.
13 warnings and 14 errors generated.
make: *** [api.o] Error 1
make: *** [attributes.o] Error 1
13 warnings and 14 errors generated.
make: *** [date.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
- removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp’
- restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/t5/z6n7fqts5sldmfy1m6f9myqr0000gs/T/RtmpWaj6Od/downloaded_packages’
Operating System: Mac OS Catalina 10.15.5
Many thanks in advance.