RStudio Opens from DMG but Not from Applications Folder on Mac

Issue:

I've installed RStudio (Version 2023.09.1+494) on my Mac. However, I got Error Starting R by clicking on the RStudio icon in the Applications folder. Strangely, if I use the DMG file, it opens without any issues, but this is not a convenient way to use the software.

System information:

  • RStudio version 2023.09.1+494
  • R version 4.3.1 (2023-06-16)
  • Platform: aarch64-apple-darwin20 (64-bit)
  • Running under: macOS Ventura 13.4
  • Chip: Apple M2

Attempted steps taken to fix:

  1. Uninstalled and reinstalled R and RStudio from RStudio Desktop - Posit.
  2. Tried this solution "move the application and define a symbolic link" but it didn't fix.

Got error:

mv: rename rsession to rsession-x86: No such file or directory

Thank you in advance for your help!


Problem report when launching RStudio:

R Session Startup Failure Report

RStudio Version

RStudio 2023.09.1+494 "Desert Sunflower " (cd7011dc, 2023-10-16) for macOS

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.09.1+494 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36

Error message

[No error available]

Process Output

The R session exited with code 1.

Error output:

dyld[60221]: 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')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/3_/r484z5y91zq43lgq9prly55w0000gn/T/rstudio-fallback-library-path-1348011923/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.3-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')), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/3_/r484z5y91zq43lgq9prly55w0000gn/T/rstudio-fallback-library-path-1348011923/libR.dylib' (no such file)
dyld[60221]: tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/3_/r484z5y91zq43lgq9prly55w0000gn/T/rstudio-fallback-library-path-1348011923/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.3-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')), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libR.dylib' (no such file), '/var/folders/3_/r484z5y91zq43lgq9prly55w0000gn/T/rstudio-fallback-library-path-1348011923/libR.dylib' (no such file)

Standard output:

[No output emitted]

Are you Intel or Silicon?

Chip: Apple M2
Thanks!!

Is your system managed by an IT department?

No, it's my own system.

I've been running an earlier version of RStudio, due to uneasiness about updating, but just installed RStudio/2023.09.1+494 to see if something had changed to make that oddball location appear, but the newer version didn't add anything there. Flailing—did you install as an administrator (root)?

Thank you for your investigation!
I installed the R as an admin. For RStudio, it's an application (DMG file) so I just dragged it into the Applications folder.

Ok, so is R in your $PATH? Can you open from terminal?

Yes. In terminal which R returns /usr/local/bin/R. I can start R from the terminal.

Ok, another one bites the dust. How does this compare from .local/share/rstudio. Check the dates?

l
.rw-r--r--@  11k ro 27 Oct 02:13 addin_registry
drwxr-xr-x     - ro  1 Feb  2022 bibliography-index
drwxr-xr-x@    - ro 27 Oct 02:40 client-state
drwxr-xr-x     - ro 26 Jun 01:23 content_urls
drwxr-xr-x     - ro 21 Feb  2022 ctx
drwxr-xr-x     - ro  1 Feb  2022 explorer-cache
.rw-r--r--@ 196k ro 27 Oct 03:00 history_database
.rw-r--r--@ 768k ro 21 Oct 01:25 history_database.1
drwxr-xr-x     - ro 12 Feb  2022 jobs
drwxrwxrwx     - ro 26 Oct 14:40 log
drwxr-xr-x     - ro  1 Feb  2022 monitored
drwxr-xr-x     - ro 14 Jun  2022 notebooks
drwxr-xr-x     - ro 30 Jun  2022 pcs
.rw-r--r--   597 ro 21 Feb  2022 persistent-state
drwxr-xr-x     - ro  1 Feb  2022 presentation
drwxr-xr-x     - ro  1 Feb  2022 profiles-cache
drwxr-xr-x     - ro  9 Jul 01:42 projects
drwxr-xr-x     - ro 20 Feb  2022 projects_settings
.rw-r--r--     5 ro 30 Jun  2022 rmd-outputs
.rw-------@  782 ro 26 Oct 00:17 rstudio-desktop.json
srwxr-xr-x@    0 ro 26 Oct 00:16 rstudio.socket
drwxr-xr-x     - ro  1 Feb  2022 rversion-settings
.rw-r--r--    27 ro 30 Jun  2022 saved_source_markers
drwxr-xr-x     - ro  1 Feb  2022 sessions
drwxr-xr-x     - ro 30 Jun  2022 sources
drwxr-xr-x     - ro  1 Feb  2022 tutorial
drwx------     - ro  1 Feb  2022 viewer-cache
drwxr-xr-x     - ro 21 Feb  2022 viewer_history

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.