can't access RStudio

Error Information: code 6, cannot access R

Description of issue - I installed the latest R and RStudio versions today, as I have for many years without problems, but today RStudio crashed when I tried to open it

Attempted steps taken to fix - deleted all R versions and reinstalled latest (R-4.1.2-arm64), which I can access outside of RStudio; deleted .Rprofile file, did Sys.which("R") and got message: no matches found: Sys.which(R)

System Information:

  • RStudio Edition: (Desktop or Server) Desktop
  • RStudio Version: 2021.09.2+382
  • OS Version: Monterey 12.0.1
  • R Version: R-4.1.2-arm64
  • Output your diagnostics report (if possible):
    Using R script: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/bin/R

Attempting to launch R session...

R_HOME=/Library/Frameworks/R.framework/Resources

R_DOC_DIR=/Library/Frameworks/R.framework/Resources/doc

R_INCLUDE_DIR=/Library/Frameworks/R.framework/Resources/include

R_SHARE_DIR=/Library/Frameworks/R.framework/Resources/share

PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin

HOME=/Users/williamholden

R session launched, attempting to connect on port 44053...

dyld[7149]: 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/williamholden/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), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/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/williamholden/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), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/libR.dylib' (no such file)

dyld[7149]: tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/williamholden/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), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/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/williamholden/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), '/lib/libR.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/libR.dylib' (no such file)

[7132:346865:20220114,135638.658476:ERROR process_reader_mac.cc:291] thread_get_state(4): (os/kern) invalid argument (4)

[7132:346865:20220114,135638.658691:ERROR process_reader_mac.cc:291] thread_get_state(4): (os/kern) invalid argument (4)

[7132:346865:20220114,135638.659010:WARNING process_reader_mac.cc:497] multiple MH_EXECUTE modules (/usr/libexec/rosetta/runtime, /Library/Apple/usr/libexec/oah/libRosettaRuntime)

[7132:346865:20220114,135638.659265:WARNING process_reader_mac.cc:497] multiple MH_EXECUTE modules (/usr/libexec/rosetta/runtime, /Applications/RStudio.app/Contents/MacOS/rsession)

[7132:346865:20220114,135638.659473:ERROR exception_snapshot_mac.cc:139] exception_thread not found in task

Connected to R session, attempting to initialize...


From RStudio Desktop Will Not Start on support.rstudio.com

It looks like RStudio is trying to load R as though it's an Intel version, but you've installed an Apple Silicon version. Do you have Apple Silicon (M1) hardware? Does R work at the command line? You might also try installing the version of R for Intel to see if that addresses the issue.

absolutely correct and works perfectly with the proper version - thanks for pointing it out, much appreciated

This topic was automatically closed 21 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.