RStudio and R will not start on Mac M1 OS X Monterey

R Studio 2021.09.0 Preview the recommended version for M1 Mac's does not start with R version 4.1.2 (2021-11-01) -- "Bird Hippie" get error message exited Code 6
and message
dyld[12119]: terminating because inserted dylib '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' could not be loaded:

Note R starts in CLI

Full trace back message below:

dyld[12119]: 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')), '/Users/davidbanham/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/libR.dylib' (no such file), '/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/davidbanham/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/libR.dylib' (no such file), '/libR.dylib' (no such file)
dyld[12119]: tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/davidbanham/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/libR.dylib' (no such file), '/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/davidbanham/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/libR.dylib' (no such file), '/libR.dylib' (no such file)

I am also running R Studio 2021.09.0 (Build 338) and R 4.1.2 on a Mac M1 Monterey. My R Studio is working fine, but I am getting the exact same error message when I try to run radian.

I am hoping someone will answer your question as I may help me as well. With the M1 chip I am never sure which version to install. Whenever I see 'arm' I always think Raspberry Pi and I hope my Mac M1 has a more power chip than the Raspberry Pi.

Hi,

I am also having the same issue. I have R version 4.1.2 for aarch64-apple-darwin20 and have tried the latest stable RStudio Build (2021.09.1+372) as well as a daily build from today (11/20/2021), and for both have received the same error messages when opening RStudio. I tried the preview release too and that didn't work.

I am able to run R from my terminal and from within Rapp. I am on macOS Monterery Version 12.0.1 with a Macbook Air M1 2020 (16 GB, 1TB). To date, I have had no issues running the arm64 builds of R through the Intel-based RStudio build until I restarted my computer after various software updates. I've tried uninstalling and reinstalling both R and Rstudio, and have not found a proper solution.

Hoping someone out there knows what's going on. I have several projects I'm working on in RStudio that I only have time for on the weekends.

Maybe we need to try and install older versions of both until this gets sorted out?

The process output: " The R session process exited with code 6 ."

Full message below:

dyld[4643]: 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')), '/Users/cameron.hatcher/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/rstudio-fallback-library-path-FzKGj1/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/cameron.hatcher/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/rstudio-fallback-library-path-FzKGj1/libR.dylib' (no such file)
dyld[4643]: tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/cameron.hatcher/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/rstudio-fallback-library-path-FzKGj1/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/cameron.hatcher/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/rstudio-fallback-library-path-FzKGj1/libR.dylib' (no such file)

Hi everyone,

Not sure if anyone else is still having problems, but I was able to find a solution to this issue.

Many thanks to this person for figuring it out. Basically, move the application and define a symbolic link, and try opening RStudio. If opening fails, execute the last line of code as stated in the comment. Who knew it was this simple?

cd /Applications/Rstudio.app/Contents/MacOS
mv rsession rsession-x86
ln -s rsession-arm64 rsession
# Open RStudio and if it fails then run this:
xattr -r -d com.apple.quarantine /Applications/RStudio.app