How to resolve R-Studio Startup error in Apple Silicon devices
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.
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!