Error launching RStudio in MacOS (Sonoma 14.4.1) after installation

I installed R and RStudio for Mac. I got the following message:

Error Starting R
RStudio 2024.04.0+735 "Chocolate Cosmos " (a00d0e77, 2024-04-24) for macOS
[No error available]

dyld[14392]: terminating because inserted dylib
'/Library/Frameworks/R.framework/Resources/lib/libR.dylib' could not be loaded: tried:
'/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible
architecture (have 'arm64', need 'x86_64')),
....
Several messages follow this one, with the same structure referencing other files, repeating that is an incompatible architecture.

I repeated installation twice ensuring that MacOS was selected for both, R and RStudio.

Please advise!

The error suggests that you have installed the ARM (M1, M2, M3) build of R but have an Intel Mac.

R comes in two flavors for Mac and you need to install the one that matches your computer's architecture.

RStudio has a single download that works on either.

For example, on R for macOS you want the one labeled "For older Intel Macs":

r-downloads

1 Like

Thanks Gary.

I have the M1 Mac running Sonoma 14.4.1. I checked it before downloading. One question, should I download only the R-4.4.0-arm64.pkg? Does it contain all the needed objects for RStudio?
Should I download the R package as well? I downloaded both. I think that the problem might be that I downloaded unnecessary objects.

I'm not sure what you package are referring to when you ask "Should I download the R package as well?"

What does the following command (i.e. run in Terminal.app) give you:

file /Library/Frameworks/R.framework/Resources/lib/libR.dylib

Thanks for your reply Gary. I was referring to RStudio and R, but I already resolved the issue.

I turned on the "Run with Rossetta" option and now RStudio launches successfully.

I got this with the file command you request:

/Library/Frameworks/R.framework/Resources/lib/libR.dylib: Mach-O 64-bit dynamically linked shared library arm64

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.