-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Problem
When I use "curl - SSF" https://sh.rustup.rs |After sh "installation, the corresponding cargo module has been installed, but it will report an error when I query the cargo version information or other software needs to call it
Steps
1.curl - SSF" https://sh.rustup.rs |After sh
2.Adopt default installation scheme
3.cargo --version
The specific error reporting information is as follows:
[root@racknerd-acba13 ~]# cargo --version
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
error: 'cargo' is not installed for the toolchain 'stable-x86_64-unknown-linux-gnu'
To install, run rustup component add cargo
[root@racknerd-acba13 ~]# rustup component add cargo
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not support components
[root@racknerd-acba13 ~]# cd /root/.cargo/bin
[root@racknerd-acba13 bin]# ./cargo --version
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
error: 'cargo' is not installed for the toolchain 'stable-x86_64-unknown-linux-gnu'
To install, run rustup component add cargo
Notes
Output of rustup --version:
[root@racknerd-acba13 ~]# rustup --version
rustup 1.23.1 (3df2264 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: The currently active rustc version is (rustc does not exist)
Output of rustup show:
[root@racknerd-acba13 ~]# rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /root/.rustup
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
stable-x86_64-unknown-linux-gnu (default)
(rustc does not exist)
The system environment is CentOS 7.9.2009 (py3.7.9)
If you need any feedback, please leave me a message. Thank you very much for your help and look forward to your reply
Here is a partial screenshot:


