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

相关推荐

  1. Rust第一安装

    2023-12-12 02:42:02       33 阅读
  2. Rust第二:入门(如入)

    2023-12-12 02:42:02       41 阅读
  3. HCIP第一

    2023-12-12 02:42:02       9 阅读
  4. Rust】第五:所有权

    2023-12-12 02:42:02       37 阅读
  5. 第一Rust程序

    2023-12-12 02:42:02       12 阅读
  6. Rust 安装

    2023-12-12 02:42:02       28 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-12 02:42:02       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-12 02:42:02       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-12 02:42:02       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-12 02:42:02       18 阅读

热门阅读

  1. springboot中优雅实现异常拦截和返回统一结构数据

    2023-12-12 02:42:02       35 阅读
  2. 代码随想录 96. 不同的二叉搜索树

    2023-12-12 02:42:02       38 阅读
  3. c++中function和lambda函数的学习

    2023-12-12 02:42:02       41 阅读
  4. 地牢手册-3d

    2023-12-12 02:42:02       40 阅读
  5. 从Makefile生成compile_commands.json

    2023-12-12 02:42:02       37 阅读
  6. android快速网络请求之android-networking

    2023-12-12 02:42:02       35 阅读
  7. Springboot实现配置多数据源

    2023-12-12 02:42:02       39 阅读
  8. LightDB - datediff 函数增强[mysql兼容]

    2023-12-12 02:42:02       33 阅读
  9. K8S学习指南(5)-k8s核心对象namespace

    2023-12-12 02:42:02       39 阅读
  10. 如何避免多线程导致的数据库重复数据问题

    2023-12-12 02:42:02       37 阅读
  11. 日常开发日志

    2023-12-12 02:42:02       40 阅读
  12. 使用boost::hana::maybe的示例程序

    2023-12-12 02:42:02       36 阅读