【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))

相关推荐
deli0071 小时前
手机拍灯为什么有一条条黑纹?PWM 240Hz 实测
前端
wangruofeng6 小时前
AI Models 1.1.0 发布,查大模型价格、对比模型和找 API 地址
前端·aigc·ai编程
脚本自动化开发6 小时前
玩影之刃零,两张四千元级显卡怎么挑
后端
wangruofeng6 小时前
给前端开发者的 100 个设计参考网站
前端·设计
starzy19908 小时前
深入理解Scala隐式类:扩展方法机制
开发语言·人工智能·scala
M--Y8 小时前
LangGraph 工作流模式
开发语言·javascript·python·langchain·大模型·llm·langgraph
星栈9 小时前
视频即代码,Remotion 能做什么、不能做什么
前端·音视频开发
广州华水科技9 小时前
单北斗GNSS位移监测系统的应用与技术解析
前端
用户47949283569159 小时前
从一句话或代码仓到可交互 HTML:开源 Agent 画图技能 Archify v3.2 实测与选型边界
前端·后端·面试
吴可可12310 小时前
WScript Shell操作注册表详解
开发语言