Unable to install MacOS R toolchain


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

pkgbuild::has_build_tools(debug = TRUE)

which returned FALSE. I then followed the instructions to download the macOS R toolchain installer, and was able to download macos-rtools-3.2.2.pkg at https://github.com/rmacoslib/r-macos-rtools/releases/tag/v3.2.2.

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 in advance!

@coatless ?

macOS added new developer requirements for installers that went into effect Jan 1st.


Solution: Resubscribe to the developer program. I might ping Bob Rudis to see if I can piggyback off of his credentials.

So, at the moment would your recommendation be the “manual install guide” from



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).

Thanks again!

Yes, unfortunately, we’ll have to use the manual installation guide. :(

Unless anyone on Stan’s side has active Apple Developer credentials.

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 .