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 ...
 
随机推荐
- OPC 协议数据采集
			
kepserver OPC Connectivity Suite 让系统和应用程序工程师能够从单一应用程序中管理他们的 OPC 数据访问 (DA) 和 OPC 统一架构 (UA) 服务器.通过减少 ...
 - logstash 配置文件语法介绍
			
大家好,我是蓝胖子,之前在构建服务监控实践那个系列里,有提到用logstash来做日志的收集,但是对于logstash的配置文件语法没有做很详细的介绍,今天就来详细聊聊logstash配置文件的语法. ...
 - [python] 基于Tablib库处理表格数据
			
Tablib是一个用于处理电子表格(如 Excel,CSV,JSON)的Python 库.它提供了一种简单而强大的方式来操作和处理数据.利用Tablib,我们可以轻松地读取.写入.过滤和转换各种类型的 ...
 - 如何将IPv4升级到IPv6?看完你就明白了
			
引言: 随着互联网的快速发展,IPv4(Internet Protocol version 4)已经无法满足日益增长的设备和用户数量的需求. IPv6(Internet Protocol versio ...
 - 0x01.web请求、web环境、抓包技巧
			
网站搭建 DNS解析 域名选择 http/https 证书 服务器 web应用环境架构 操作系统 linux windows 开发语言 php java ASP/ASPX python等 程序源码 C ...
 - MVC控制器传DataTable
			
MVC中,控制器return Json(DataTable)会出现错误: 序列化类型为"System.Reflection.RuntimeModule"的对象时检测到循环引用. 解 ...
 - 14、Map
			
1.Map的定义 map是Go中的内置类型,它将一个值与一个键关联起来.可以使用相应的键检索值.Map 是一种无序的键值对的集合.Map 最重要的一点是通过 key 来快速检索数据,key 类似于索引 ...
 - 自上而下的LL(1)语法分析法
			
LL(1)文法:从文法的开始符,向下推导,推出句子. 对文法G的句子进行确定的自顶向下语法分析的充分必要条件是,G的任意两个具有相同左部的 产生式A->α|β 满足下列条件: (1)如果α.β均 ...
 - 【笔记整理】请求携带cookie的两种方法
			
""" 方法一:在请求头header中携带Cookie请求头信息(因为本身Cookie就是用请求头传递的....) 方法二:使用cookie参数传递cookie字典 &q ...
 - android webview(外部浏览器)调起app
			
最近写的项目中涉及外部浏览器以及项目webview中调起app,所以总结下,和大家分享下. 总的实现方法还是比较简单的, 1:在清单中注册 首先在AndroidManifest文件中,注册一个过滤器 ...