
久しぶりにRStudioを更新したらなんか警告が出ました。
RStudio cannot write to required folders
RStudio requires write access to the following folders, but writing to them failed:
/Users/(ワシのユーザー名)/.config/rstudio
(EACCES: permission denied, mkdir '/Users/(ワシのユーザー名)/.config/rstudio')RStudio may fail to start or may not work correctly until this is resolved. Please check that these folders have the expected ownership and permissions.
今まで見たことのない事例だったのですが、調べたら一応解決はできました。
解決方法
1 ターミナルで状況を確認する
ls -ld ~/.config ls -la ~/.config
とりあえずターミナルで上記のコマンドを叩いて状況を確認します。
おそらく所有者が root になっています。
2. 所有者を自分に戻す
sudo chown -R $(whoami) ~/.config
引き続きターミナルで上記のコマンドを叩きます。
パスワードを求められるので、Macのパスワードを入れます。
3. RStudioを再起動する
これで問題なく起動します。
うまくいかない場合
1. もし ~/.config 自体が存在しない場合
mkdir -p ~/.config
で.configフォルダーを作ってください。

