【Rust】第一节:安装

1 说明

一些学习记录
环境:MacOS

2 步骤

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

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、看到报错

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

  • 8
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值