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

相关推荐
西门啐血22 分钟前
上位机开发之假装有设备,使用 C# 模拟串口设备
开发语言·mongodb·c#
TunerT_TQ25 分钟前
Valhalla 静态工程审阅 #008|RisingWave 源码证据驱动评测【大厂开源基础设施特辑】
rust·开源·github·实时数据处理·流式数据库·apacheflink·streamingsql
Csvn27 分钟前
📊 SQL 入门 Day 11:CASE 表达式:SQL 里的 if-else 魔法
后端·sql
Csvn28 分钟前
🎯 原生 `<dialog>` 元素:终于可以扔掉一半的自定义弹窗组件了?
前端
QQ_216962909629 分钟前
Spring Boot 养老院管理系统:从入住、护理到费用结算的全流程实现(源码可领)
java·spring boot·后端
Csvn29 分钟前
🎨 CSS @layer:用「层叠优先级」终结样式打架的世纪难题
前端
濮水大叔1 小时前
不必把 Vue3 写成“麻花”:从状态碎片到对象协作,重新理解 Zova 的前端心智模型
前端·typescript·vue3·ioc·tsx·zova
阿米亚波1 小时前
【C++ STL】std::unordered_multiset
开发语言·数据结构·c++·笔记·stl
我是唐青枫2 小时前
Java ReentrantLock 实战详解:比 synchronized 更灵活的可重入锁
java·开发语言
QH139292318802 小时前
# R&S ZNB43 ZNA43 ZNA67矢量网络分析仪
开发语言·网络·php