I am trying to install RStan on my Macbook (OS Catalina 10.15.1) in RStudio (version 1.0.143) using the steps on https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started. I checked whether the C++ toolchain is properly installed using the command
My problem is that my Macbook won’t open this .pkg file because “because Apple cannot check it for malicious software”. I have tried to override this by right-clicking on the .pkg file and selecting Open, but even after overriding the security preferences to install the app, I get the following error code:
The operation couldn’t be completed. (OSStatus error -60008.)
Could anyone please help me figure out how to install this toolchain–maybe using the command line?
Thanks for your replies. I followed the manual install guide above and the C++ toolchain appears to now be properly installed (pkgbuild::has_build_tools(debug = TRUE) returns TRUE).
I don’t think any of the Stan developers does but quite possibly someone on the forum does. Or we might be able to fund it through the @SGB or @andrewgelman .
I’m on a Mac with a Big Sur operating system and an M1 chip, and the toolchain isn’t working, resulting only in a big message that says “Installation Failed.” This is a brand new computer with no prior installations of R, XCode, etc.
(edit)
As an update, I managed to get things installed with insights from the manual install guide.
ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0'
ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sourceCpp_2.so] Error 1
Regrettably, I don’t remember … it was matched to the Mac OS that I had at the time. I wish I could say more specifically, but I’ve changed to a different computer by now. Good luck. It’s frustrating, but persistence will probably get you there.
Had the same error as described above by jeremy (“Installation Failed.” ) and realized thanks to this thread that it might be because I had XCode and gfortran already installed.
I am currently running mac 12.6.1. with gfortran 11.2.0 (installed via homebrew).
So I directly installed stan and verification is fine and could also reproduce the first example (Eight Schools).
For folks stumbling upon this issue, please note we’ve discontinued the macOS installer package that setup the toolchain in favor of an R package called {macrtools}. You can obtained it from: