error: it looks like you have an existing installation of Rust at:
error: /home/pnkfelix/bin
error: rustup cannot be installed alongside Rust. Please uninstall first
error: if this is what you want, restart the installation with `-y'
error: cannot install while Rust is installed
上述error表明
如果你用命令“curl https://sh.rustup.rs -sSf | sh” 安装rustup失败,提示上述error,则可参照下述方案解决问题:
上述error的意思是你已经安装了rustc,而装rustup是要求不能预装rustc的,因此,你需要先把旧的rustc卸载掉,再重新装rustup,即可;
1.sudo apt-get remove rustc
卸载rustc
2. curl https://sh.rustup.rs -sSf | sh
重装rustup,安装步骤参考 https://skyao.io/learning-rust/installation/linux.html
3. source $HOME/.cargo/env
环境变量生效
4. 重启terminal