Rust:- Installation – Warning – “Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later”

Background

Trying to install a rust compiler on my windows laptop.

Got a warning.

Let us quickly cover it.

Warning

Command

Earlier I downloaded rust-init.exe.

rustup-init.exe

Images

Image – “Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later, but they don’t seem to be installed”

Text

 

>rustup-init.exe

Rust Visual C++ prerequisites

Rust requires the Microsoft C++ build tools for Visual Studio 2013 or
later, but they don’t seem to be installed.

You can acquire the build tools by installing Microsoft
Visual C++ Build Tools 2019 which provides just the Visual C++ build
tools:

https://visualstudio.microsoft.com/visual-cpp-build-tools/

Check its box for “Desktop development with C++” which will ensure that
the Windows 10 SDK is selected. If your locale language is not English,
then additionally check the box for English under Language packs.
Or minimally, use the tab “Individual Components” and select these items:

“MSVC – VS 2019 C++ x64/x86 build tools”
and
“Windows 10 SDK”

Alternately, you can install Visual Studio 2019, Visual Studio 2017,
Visual Studio 2015, or Visual Studio 2013 and during install select
the “C++ tools”:

https://visualstudio.microsoft.com/downloads/

  • Install the C++ build tools before proceeding.

If you will be targeting the GNU ABI or otherwise know what you are
doing then it is fine to continue installation without the build
tools, but otherwise, install the C++ build tools before proceeding.

Continue? (y/N)

 

Explanation

  1. Warning
    • Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later, but they don’t seem to be installed.
  2. Options
    • Microsoft
      • Microsoft Visual C++ Build Tools 2019
        • You can acquire the build tools by installing Microsoft Visual C++ Build Tools 2019 which provides just the Visual C++ build tools
        • Available at https://visualstudio.microsoft.com/visual-cpp-build-tools/
        • Check its box for “Desktop development with C++” which will ensure that the Windows 10 SDK is selected.
        • If your locale language is not English, then additionally check the box for English under Language packs.
        • Or minimally, use the tab “Individual Components” and select these items:
          • MSVC – VS 2019 C++ x64/x86 build tools
          • Windows 10 SDK
      • Microsoft Visual Studio 2013 and later
        • Alternately, you can install Visual Studio 2019, Visual Studio 2017, Visual Studio 2015, or Visual Studio 2013
        • Install select the “C++ tools”
    • GNU ABI

 

Remediation

I know I have Visual Studio 2019 installed.

But, failed to start the command shell using Visual Studio Command Prompt Option.

Images

Initiate

Win OS – Start Menu – Visual Studio

Run

Win OS – Visual Studio x64 Win64 Command Prompt ( 2010 ) – rustup-init.exe

Image

Text

>rustup-init.exe

Welcome 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:

C:\Users\dadeniji\.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

C:\Users\dadeniji\.cargo

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\dadeniji\.cargo\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.

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

Summary

Yo family.

I got to go.

My alarm is set for 6:45 AM.

Got a database deployment set for 7 AM.

Can’t let bro down.

He is a good, straight forward man.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s