Viswa Kumar
  • Home
  • About
    • My Background
    • My reading list
  • Research
    • Research Overview
    • Publications
  • Writing
    • Blog
    • Newsletter
    • Papershelf
    • Book Notes
  • Projects

On this page

  • The R Studio startup issue 🚨
  • The Aha Moment πŸ’‘

How to resolve R-Studio Startup error in Apple Silicon devices

R
Quarto
Troubleshooting
Tips
Read this post to understand how to resolve R-Studio Startup error in Apple Silicon devices
Published

October 20, 2023

Need a TL;DR version? Please read πŸ‘‡πŸ»

TL;DR

Check whether .local dir under your current / main user account (most probably a with sudo or root) is owned by the user. If not, do a chown to the current logged in user. This should fix the startup issue with the R Studio.

The R Studio startup issue 🚨

If you own a apple device with apple silicon (M1, M1 Ultra, M2) and if you attempt to download & install R and R Studio Desktop and while you are eager to get your hands dirty with some nice R Visualisations or if you are like me who want to try the R Studio Desktop exprierence for the Quarto Projects then chances are you might hit with below error 🀦🏼

You would then probably google this error like a maniac and come across links such this, this & this and dejected to see expired posts.

And then you will see this post where the OP has shared a shady looking way to resolve this. You will try this and alas and it would work like a charm

Most of us would stop here and went on with their day, but my engineer brain didn’t allow me to. I further explored as to why copying the shared\rstudio folder to .local worked and deleted that folder again and tried restarting R Studio. BaamπŸ’₯πŸ’₯ same error.

So clearly, R Studio couldn’t create rstudio folder inside .local for some reason as part of my main user account (which has root privilege) where as as a standard user, R Studio was able to create that folder, which in effect allowed R Studio to start without any issues.

The Aha Moment πŸ’‘

Since it was clear as the light that this could be a permission issue, I went ahead to inspect the perms for the .local dir within my main root account

There it is. .local dir was owned by root, hence R Studio application was not able to create a dir.

The Fix was to chown to the current user instead of root and this problem disappeared instantly.

Subscribe to Techno Adventure Newsletter

I also publish a newsletter where I share my techo adventures in the intersection of Telecom, AI/ML, SW Engineering and Distributed systems. If you like getting my post delivered directly to your inbox whenever I publish, then consider subscribing to my substack.

I pinky promise πŸ€™πŸ» . I won’t sell your emails!

Subscribe βœ‰οΈ

 

Copyright 2024, Viswa Kumar