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 ...
随机推荐
- 低代码平台解密:探秘MQTT协议的应用之道
前言 低代码平台作为当今快速发展的技术之一,为开发人员提供了更高效.更简便的工具和方法,以快速构建和部署应用程序.而MQTT协议作为物联网领域的重要通信协议,在低代码平台上的应用也日益受到关注,今天小 ...
- 【Javaweb】jsp | 简单学习【笔记保存】
什么是jsp,它有什么用? jsp的全称是java server pages.Java的服务器界面. jsp的主要作用是代替Servlet程序回传html页面的数据 因为Servlet程序回传html ...
- Cassandra中的MerkleTree反熵机制
构建MerkleTree Cassandra 是一个分布式数据库系统,它使用 Merkle 树来实现数据一致性和数据完整性的验证. 在 Cassandra 中,每个节点都维护着自己的数据副本.为了确保 ...
- SpringBoot整合数据可视化大屏使用
整合数据可视化大屏是现代化应用程序中的一个重要组成部分,它可以帮助我们更直观地展示和理解大量的数据. 在Spring Boot框架中,我们可以使用一些优秀的前端数据可视化库来实现数据可视化大屏,例如E ...
- [ABC281G] Farthest City
Problem Statement You are given positive integers $N$ and $M$. Find the number, modulo $M$, of simpl ...
- hbase报错 ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet
hbase报错:hbase shell能打开 网页也能打开 但是一执行命令就开始报错. 原因:hadoop的安全模式打开. 解决方法:关闭安全模式 ,再重新启动HBase就可以了. 具体的命令: 1. ...
- ElasticSearch之cat transforms API
命令样例如下: curl -X GET "https://localhost:9200/_cat/transforms?v=true&format=json" --cace ...
- vulnhub - Fawks - writeup
信息收集 目标开放了21的ftp有匿名登录,除此之外还有常规的80,和连个ssh的端口. 80端口的是一张图片,就是哈利波特的海报图. anonymous空密码登上去有一个文件下载下来是二进制的文件 ...
- react-native在windows环境搭建并使用脚手架新建工程
截止到2024-1-11,使用的主要软件的版本如下: 软件实体 版本 react-native 0.73.1 react 18.2.0 react-native-cli 2.0.1 Android S ...
- GitHub星标1k+的C#/.NET/.NET Core学习、工作、面试指南(让现在的自己不再迷茫✨)
缘起 概述:发现现如今网上关于Java.前端.Android.Golang...等相关技术的学习资料,面试指南一搜都是一大把,但是我们大.NET/C#的相关学习资料,面试指南和一些常见的面试题都是寥寥 ...