macos won’t let me run R

After successfully installing R, you click on R.app to start R and receive an error message.

Close the message, then navigate to R.app in Applications, right-click, and select Open. You will get a new error message that now includes an option to open the app anyway.

Why this error message?

macos is protecting you from third party installation. This is “Gatekeeper”.

Taming Apple’s Gatekeeper

On Mountain Lion (10.7) and later (Mountain Lion, Mavericks, Yosemite…) you may need to explicitly approve installation of R and for the packages. GateKeeper is a new safety feature on Macs, which will allow you to install applications from the

  1. Mac App Store
  2. Mac App Store and approved identified developers
  3. Anywhere

The default GateKeeper setting is option 2, “”Mac App Store and approved identified developers. To proceed with XQuartz and R installation you must change this setting in System Preferences → Security & Privacy → General tab. To approve installation of only one application, like R, all you will need to do is right-click (control-click) on any unsigned packages and select ‘Open’. From the official R web page: “As packages are updated by the R CRAN team, this will become less necessary because new packages are signed.”