Rust 入门:安装报错解决
文章摘要
Efu GPT
此内容根据文章生成,并经过人工审核,仅用于文章内容的解释与总结
投诉今天兴致来了,想接触一直热门的 Rust
语言,在查阅官方文档后通过安装脚本:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
报错以下信息:
error: could not amend shell profile: '/Users/sco/.bashrc': could not write
rcfile file: '/Users/sco/.bashrc': Permission denied (os error 13)
解决办法
手动下载脚本到本地并使用 Sudo 加权限运行。-o 后为保存路径
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o ~/rustup-init.sh
然后执行:
chmod 777 ~/rustup-init.sh
sudo ~/rustup-init.sh
安装好后删除脚本:
rm ~/rustup-init.sh
检查 Rust 版本
rustc --version
efu@Efus-Mac-Pro ~ % rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)
官方脚本运行时需要下载资源,可以尝试使用数据网络或者代理 Terminal
- 感谢您的赞赏。
赞赏名单
因为有你们的支持,我才体会到写文章的价值。
本文是原创文章,采用CC BY-NC-SA 4.0协议,完整转载请注明来自Ever Fu
评论 ()