目次
環境
- wsl2
- windows 10 pro
- ubuntu 20.02
build essentialのインストール
rustをcompileするために、gnu debuggerやcやc++のcompileツールがまとめて入っているbuild-essentialをインストールします。
まずUbuntuのパッケージ管理ツールのapt のリポジトリを更新します。
$ sudo apt update
$ sudo apt install build-essential
build-essentialがインストールされたことを確認します。
$ gcc --version

rust インストール
下記のInstall Rustを参考にrustupをインストールする
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh


rustのパスを通すために、cargoのenvファイルを再ロードします。
$ source $HOME/.cargo/env
パスが通っていることを確認します。
$ rustc --version

version情報が返ってこればrustの環境構築は完了です。
コメント