in my personal folder I have a folder called ".cargo". created by: curl https://sh.rustup.rs -sSf | sh
But reinstall my linux system.
Can I restore to my new system without re-downloading?
If it's still running on the same platform, it's safe to just copy the .cargo
folder back, and update your shell to add $HOME/.cargo/bin
dir to PATH
.
how would it be ?
i try open rust from cargo folder, and error:
pichi@bs:~/.cargo/bin$ ./rustc --version
error: rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is conf
igured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
When copying you should preserve hardlinks, since all those files in bin
are hardlinks to the rustup wrapper. And run rustup default stable as instructed.
I suggest rsync -aHAX
to copy while preserving hardlinks (and other things). With -vi
or -Pvi
if you like feedback, and simulate with -n
to check yourself or if you're otherwise unfamiliar with rsync
.
i have a folder in my home "./cargo" that contain another folder "bin" and bin contain:
cargo, cargo-clippy, rustc, and others ...
I ran this command in my shell:
rustup default stable
THE OUTPUT:
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
732.1 KiB / 732.1 KiB (100 %) 163.7 KiB/s in 8s ETA: 0s
info: latest update on 2023-03-09, rust version 1.68.0 (2c8cc3432 2023-03-06)
info: downloading component 'cargo'
info: downloading component 'clippy'
... etc
HOW JUMP THIS DOWNLOAD ?? (I already have it in the cargo folder)
i have a folder in my home "./cargo" that contain another folder "bin" and bin contain:
cargo, cargo-clippy, rustc, and others ...
I ran this command in my shell:
rustup default stable
THE OUTPUT:
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
732.1 KiB / 732.1 KiB (100 %) 163.7 KiB/s in 8s ETA: 0s
info: latest update on 2023-03-09, rust version 1.68.0 (2c8cc3432 2023-03-06)
info: downloading component 'cargo'
info: downloading component 'clippy'
... etc
HOW JUMP THIS DOWNLOAD ?? (I already have it in the cargo folder)
Oh, there's also ~/.rustup/
dir.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.