I'm trying to install rust and cargo on a macOS desktop by SSHing into the desktop. When I try commands like curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh to install rust, I get errors like info: downloading installer
dyld: cannot load 'rustup-init' (load command 0x80000034 is unknown)
sh: line 570: 18067 Abort trap: 6 "$@".
I've tried installing brew through SSH, but that has not worked either. Is there any other way to install Rust or is there some way to fix this?