Home / 开发 / Rust 安装后没有找到.cargo文件夹
安装后提示位置,但是找不到文件夹,并且无法使用
The Cargo home directory is located at:
C:\Users\user\.cargo\bin
This 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:
C:\Users\user\.cargo\bin\bin
The Cargo home directory is located at:
C:\Users\user\.cargo\bin
This 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:
C:\Users\user\.cargo\bin\bin
This path will then be added to your PATH environment variable by
modifying the HKEY_CURRENT_USER/Environment/PATH registry key.
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
解决办法
需要以管理员身份从 PowerShell 再运行安装文件 rustup-init.exe
Current installation options:
default host triple: x86_64-pc-windows-msvc
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
然后按1回车,继续安装。
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload its PATH environment variable to include
Cargo's bin directory (%USERPROFILE%\.cargo\bin).
Press the Enter key to continue.
安装完成,成功