Rust Installation with relative Configuration
References
rustup 是 Rust 的安装程序,也是它的版本管理程序。 强烈建议使用 rustup 来安装 Rust,当然如果你有异心,请寻找其它安装方式,然后再从下一节开始阅读。
haha,开个玩笑。读者乃大大,怎么能弃之不顾。
注意:如果你不想用或者不能用 rustup,请参见 Rust 其它安装方法。
在 Linux 或 macOS 上安装 rustup
官方的下载方式
打开终端并输入下面命令:
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
这个命令将下载一个脚本并开始安装 rustup 工具,此工具将安装 Rust 的最新稳定版本。可能会提示你输入管理员密码。
如果安装成功,将出现下面这行:
Rust is installed now. Great!
OK,这样就已经完成 Rust 安装啦。
使用 Brew 进行安装 推荐
如果想用 brew 安装,那就直接安装 rustup 工具:
$ brew install rustup-init
安装 Rust 之前,可以设置 ustc 的代理来提高下载速度:
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
然后执行:
$ rustup-init
即可安装好 rust 环境及相关工具链。
不过这样安装,要升级 rustup 不能这样子升级:
$ rustup self update
上面命令是无效的,brew 接管了 rustup 的更新及卸载。需要卸载 rust 环境可以使用官网的命令安装 rustup 卸载。
安装完成后设置 Crates 镜像(编辑 $HOME/.cargo/config):
本机的位置是:
/Users/koshkaaa/.cargo/config
为了解决 crates.io 仓库代码拉取满的异常,很多次超时导致引用库没法编译。
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
查看安装版本
➜ rustc --version
rustc 1.74.0 (79e9716c9 2023-11-13)
➜ cargo --version
cargo 1.74.0 (ecb9851af 2023-10-18)
➜ rustup --version
rustup 1.26.0 (2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.74.0 (79e9716c9 2023-11-13)`
Rust Installation with relative Configuration的更多相关文章
- Qt5 installation and path configuration
Replace Default Qt version paths in: /usr/lib/x86_64-linux-gnu/qtchooser/default.confor in newer rel ...
- P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1
P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ...
- Apache Tomcat 9 Installation on Linux (RHEL and clones)
Apache Tomcat 9 is not available from the standard RHEL distributions, so this article provides info ...
- linux服务之openfiler
架构:b/s 服务器端:封装好的linux系统 客户端:浏览器 相关包:封装好的linux系统 Openfiler imports user and group information from ce ...
- Automake
Automake是用来根据Makefile.am生成Makefile.in的工具 标准Makefile目标 'make all' Build programs, libraries, document ...
- Miscellaneous Articles
标记一下,慢慢看 http://www.oracle-base.com/articles/misc/articles-misc.php Miscellaneous Articles DBA Deve ...
- Easy Install详细参数
Easy Install Easy Install is a python module (easy_install) bundled with setuptools that lets you au ...
- cobbler深入学习
cobbler重要目录和cobbler各对象的关系 /var/www/cobbler/ks_mirror 存放操作系统镜像/var/www/cobbler/repo_mirror 存放仓库镜像/var ...
- cobbler安装、部署、测试
cobbler功能介绍 官网:http://cobbler.github.io 安装 yum install -y httpd tftp dhcp cobbler cobbler-web pykick ...
- CENTOS 6.4 安装oracle 10g,手工建库及升级到10.2.0.5
一. 数据库软件安装 参照官方手册 1.安装rpm包 注这里的yum直接用163的yum yum -y install binutils compat-libstdc++-33 compat-libs ...
随机推荐
- mysql可视化工具有哪些?优点是什么?
MySQL 是一种广泛使用的关系型数据库管理系统(RDBMS),由于其开放源代码和高度可定制化的优势,广受开发者欢迎.为了更加高效地管理 MySQL 数据库,我们通常需要使用 MySQL 可视化工具. ...
- 如何理解微服务体系结构中的 CQRS
本文翻译自 How To Understand CQRS In Microservices Architecture,原作者 OLEKSII. 问题描述 在典型的软件应用程序中,有一个负责写入和读取操 ...
- Springboot整合shiro,带你学会shiro,入门级别教程,由浅入深,完整代码案例,各位项目想加这个模块的人也可以看这个,又或者不会mybatis-plus的也可以看这个
如果你对shiro有问题的话,请看这篇文章:Springboot+shiro,完整教程,带你学会shiro-CSDN博客 第一步,先准备数据库: 数据库需要准备三个表,一个user表,一个role表, ...
- 数据库的连接用Java
第一步注册驱动 Class.forName("com.mysql.cj.jdbc.Driver"); 第二步创建用户密码,和具体的url static String name = ...
- Socket.D 网络应用协议,v2.1.6 发布
有用户说,"Socket.D 之于 Socket,尤如 Vue 之于 Js.Mvc 之于 Http" 与其它协议的简单对比 对比项目 socket.d http websocket ...
- [ABC313F] Flip Machines
Problem Statement There are $N$ cards numbered $1$ through $N$. Each face of a card has an integer w ...
- [ABC265F] Manhattan Cafe
Problem Statement In an $N$-dimensional space, the Manhattan distance $d(x,y)$ between two points $x ...
- 自定义线程池将异常"吃了"
今天在做项目时,写了一个使用自定义线程池执行远程调用 // 删除购物车信息 corePoolExecutor.submit(() -> { try { cartFeignClient.delet ...
- flask上下文、g变量、current_app
在flask中的上下文分为两种 : 请求上下文 (request context) 也就是和请求相关的上下文,记录一些请求相关的数据. 包含: 1.request请求对象 2.session会话 应用 ...
- Scrapy爬虫文件代码基本认识和细节解释
import scrapy from scrapy.http.request import Request from scrapy.http.response.html import HtmlResp ...