【Rust】第一节:安装

1 说明

一些学习记录

环境:MacOS

2 步骤

1、执行curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

2、看到打印

rust 复制代码
info: downloading installer

Welcome to Rust!

... ...

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /Users/rogerqian/.profile
  /Users/rogerqian/.bash_profile
  /Users/rogerqian/.zshenv

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:


   default host triple: aarch64-apple-darwin
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation

3、键入1,回车

4、看到报错

shell 复制代码
could not amend shell profile: '/Users/rogerqian/.bash_profile': could not write rcfile file: '/Users/rogerqian/.bash_profile': Permission denied (os error 13)`

5、修改权限,执行cd /Users/XXX,然后chmod 777 .profile,如果报错中还有其他文件,同理进行修改

6、查看权限修改是否成功ls -l .profile

7、再次执行步骤1、2、3,看到Rust is installed now. Great!即为成功

8、关闭终端,重新进入,rustc --version,验证是否安装成功

9、下载c编译器xcode-select --install(如果你没有的话)

3 参考

Rust 程序设计语言 中文版 安装
解决使用Rustup在Linux或macOS上无法安装Rust(Permission denied (os error 13))

相关推荐
传人几秒前
悬停旋转放大和位移效果如何写
前端·javascript·css
yunwei373 分钟前
eBPF 开发实践:使用 eBPF 隐藏进程或文件信息
linux·后端·性能优化
高频因子挖掘机4 分钟前
行情监控脚本重启后,怎样快速恢复而不重复拉取数据?
后端·github·api
aleafboat6 分钟前
只管去写(day2) 用claude分析老项目技术栈
后端
vx_Biye_Design12 分钟前
springboot宠物领养与救助平台64334-计算机课程设计、毕业设计
java·vue.js·spring boot·后端·mysql·课程设计·宠物
用户77139702070615 分钟前
.NET 依赖注入入门
后端
沐晓时光15 分钟前
C语言入门,深入理解指针(2)
c语言·开发语言
量化分析码农20 分钟前
【Python量化系统工程实战 #03】任务跑挂了没人知道?用 60 行代码搭一套「监控 + 邮件 + 桌面推送」告警系统
后端
柠檬味拥抱25 分钟前
基于YOLOv8的电梯内电瓶车检测识别(中英文双版) | 附完整源码与效果演示
后端
2601_9628857229 分钟前
如何用 Python 做均线粘合选股?(多头发散前的变盘候选)
开发语言·python