I tried installing Rust using the below command, which is recommended by https://rustup.rs/ for Unixes:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
but getting an error
error: could not amend shell profile: '/Users/XXXX/.bash_profile'
could not write rcfile file: '/Users/XXXX/.bash_profile'
Permission denied (os error 13)
However, I am using zsh
not bash
.
Your home directory seems to not be editable which crashes the installer.
There seems to be a fix for this discussed in a rustup repo issue. Append
-s -- -y --no-modify-path
tobash
:Alternatively, you could give write permission to the path that couldn't be edited, or run this command with
sudo
.