当前位置: 首页 > news >正文

Rust 安装

 curl 方式
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installerWelcome to Rust!This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:/root/.rustupThis can be modified with the RUSTUP_HOME environment variable.The Cargo home directory is located at:/root/.cargoThis can be modified with the CARGO_HOME environment variable.The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:/root/.cargo/binThis path will then be added to your PATH environment variable by
modifying the profile files located at:/root/.profile/root/.bashrcYou can uninstall at any time with rustup self uninstall and
these changes will be reverted.Current installation options:default host triple: x86_64-unknown-linux-gnudefault toolchain: stable (default)profile: defaultmodify PATH variable: yes1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
712.1 KiB / 712.1 KiB (100 %) 247.7 KiB/s in  2s ETA:  0s
info: latest update on 2024-02-08, rust version 1.76.0 (07dca489a 2024-02-04)
info: downloading component 'cargo'8.5 MiB /   8.5 MiB (100 %)   1.0 MiB/s in 12s ETA:  0s
info: downloading component 'clippy'2.1 MiB /   2.1 MiB (100 %)   1.4 MiB/s in  2s ETA:  0s
info: downloading component 'rust-docs'14.7 MiB /  14.7 MiB (100 %)   1.5 MiB/s in 10s ETA:  0s
info: downloading component 'rust-std'23.9 MiB /  23.9 MiB (100 %)   1.6 MiB/s in 16s ETA:  0s
info: downloading component 'rustc'62.3 MiB /  62.3 MiB (100 %)   4.0 MiB/s in 27s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'14.7 MiB /  14.7 MiB (100 %) 854.4 KiB/s in 55s ETA:  0s
info: installing component 'rust-std'23.9 MiB /  23.9 MiB (100 %)   8.0 MiB/s in  7s ETA:  0s
info: installing component 'rustc'62.3 MiB /  62.3 MiB (100 %)   9.0 MiB/s in  7s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'stable-x86_64-unknown-linux-gnu installed - rustc 1.76.0 (07dca489a 2024-02-04)Rust is installed now. Great!To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).To configure your current shell, run:
source "$HOME/.cargo/env"

 

apt 方式
apt install rustc cargo
# apt install rustc cargo
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
建议安装:cargo-doc llvm-17 lld-17 clang-17
下列【新】软件包将被安装:cargo rustc
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 9,685 kB 的归档。
解压缩后会消耗 30.7 MB 的额外空间。
获取:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 rustc amd64 1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04 [3,341 kB]
获取:2 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 cargo amd64 1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04 [6,345 kB]
已下载 9,685 kB,耗时 50秒 (192 kB/s)                                                 
正在选中未选择的软件包 rustc。
(正在读取数据库 ... 系统当前共安装有 117222 个文件和目录。)
准备解压 .../rustc_1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04_amd64.deb  ...
正在解压 rustc (1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
正在选中未选择的软件包 cargo。
准备解压 .../cargo_1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04_amd64.deb  ...
正在解压 cargo (1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
正在设置 rustc (1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
正在设置 cargo (1.73.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...

相关文章:

  • mysql在服务器中的主从复制Linux下
  • 基于Redis商品库存扣减方案
  • 第一个 Angular 项目 - 动态页面
  • Elastic Search:构建语义搜索体验
  • 简单几步通过DD工具把云服务器系统Linux改为windows
  • Linux编译器---gcc/g++使用详解
  • ChatGPT在数据处理中的应用
  • C++从入门到精通 第五章(指针与引用)
  • ai图片放大老照片ai处理ps学习
  • 回调函数(Language C)
  • JavaSec 之 SQL 注入简单了解
  • 利用PaddleNLP进行文本数据脱敏
  • 前后端延迟怎么解决
  • 汽车信息安全--S32K3的HSE如何与App Core通信(1)?
  • 稀疏计算、彩票假说、MoE、SparseGPT
  • android高仿小视频、应用锁、3种存储库、QQ小红点动画、仿支付宝图表等源码...
  • angular2开源库收集
  • Asm.js的简单介绍
  • create-react-app做的留言板
  • javascript数组去重/查找/插入/删除
  • spark本地环境的搭建到运行第一个spark程序
  • Spring Cloud Feign的两种使用姿势
  • Vim Clutch | 面向脚踏板编程……
  • Work@Alibaba 阿里巴巴的企业应用构建之路
  • 初识MongoDB分片
  • 从重复到重用
  • 欢迎参加第二届中国游戏开发者大会
  • 技术发展面试
  • 算法-插入排序
  • 微信小程序设置上一页数据
  • Semaphore
  • #1014 : Trie树
  • #define 用法
  • #NOIP 2014# day.1 生活大爆炸版 石头剪刀布
  • (4.10~4.16)
  • (Matalb时序预测)PSO-BP粒子群算法优化BP神经网络的多维时序回归预测
  • (ZT)薛涌:谈贫说富
  • (数位dp) 算法竞赛入门到进阶 书本题集
  • (转)Linux下编译安装log4cxx
  • (转)平衡树
  • **python多态
  • .bat批处理(四):路径相关%cd%和%~dp0的区别
  • .NET Core6.0 MVC+layui+SqlSugar 简单增删改查
  • .Net mvc总结
  • .net 开发怎么实现前后端分离_前后端分离:分离式开发和一体式发布
  • .NET 中选择合适的文件打开模式(CreateNew, Create, Open, OpenOrCreate, Truncate, Append)
  • .NET面试题(二)
  • .NET实现之(自动更新)
  • @vue/cli 3.x+引入jQuery
  • [BJDCTF2020]The mystery of ip1
  • [BUG]Datax写入数据到psql报不能序列化特殊字符
  • [BZOJ] 2006: [NOI2010]超级钢琴
  • [C#]C# winform部署yolov8目标检测的openvino模型
  • [C#]winform制作圆形进度条好用的圆环圆形进度条控件和使用方法
  • [CakePHP] 在Controller中使用Helper