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

相关推荐
子兮曰13 小时前
OpenClaw入门:从零开始搭建你的私有化AI助手
前端·架构·github
Victor35613 小时前
https://editor.csdn.net/md/?articleId=139321571&spm=1011.2415.3001.9698
后端
吴仰晖13 小时前
使用github copliot chat的源码学习之Chromium Compositor
前端
1024小神13 小时前
github发布pages的几种状态记录
前端
Victor35613 小时前
Hibernate(89)如何在压力测试中使用Hibernate?
后端
灰子学技术14 小时前
go response.Body.close()导致连接异常处理
开发语言·后端·golang
二十雨辰15 小时前
[python]-AI大模型
开发语言·人工智能·python
不像程序员的程序媛15 小时前
Nginx日志切分
服务器·前端·nginx
Yvonne爱编码15 小时前
JAVA数据结构 DAY6-栈和队列
java·开发语言·数据结构·python
Re.不晚15 小时前
JAVA进阶之路——无奖问答挑战1
java·开发语言