Install substrate
Refer to the source to install the substrate programs
Before you begin
Check the documentation for your operating system for information about the packages that are installed and how to download and install any additional packages you might need. For example, if you use Ubuntu, you can use the Ubuntu Advanced Packaging Tool (apt) to install the build-essential package:
At a minimum, you need the following packages before you install Rust:
Because the blockchain requires standard cryptography to support the generation of public/private key pairs and the validation of transaction signatures, you must also have a package that provides cryptography, such as libssl-dev or openssl-devel.
Install required packages and Rust
To install the Rust toolchain on Linux:
Log on to your computer and open a terminal shell.
Check the packages you have installed on the local computer by running an appropriate package management command for your Linux distribution.
Add any package dependencies you are missing to your local development environment by running an appropriate package management command for your Linux distribution.
For example, on Ubuntu Desktop or Ubuntu Server, you might run a command similar to the following:
Click the tab titles to see examples for other Linux operating systems:
DebianArchFedoraOpensuse
Remember that different distributions might use different package managers and bundle packages in different ways. For example, depending on your installation selections, Ubuntu Desktop and Ubuntu Server might have different packages and different requirements. However, the packages listed in the command-line examples are applicable for many common Linux distributions, including Debian, Linux Mint, MX Linux, and Elementary OS.
Download the
rustupinstallation program and use it to install Rust by running the following command:Follow the prompts displayed to proceed with a default installation.
Update your current shell to include Cargo by running the following command:
Verify your installation by running the following command:
Configure the Rust toolchain to default to the latest stable version by running the following commands:
Add the
nightlyrelease and thenightlyWebAssembly (wasm) targets to your development environment by running the following commands:Verify the configuration of your development environment by running the following command:
The command displays output similar to the following:
Last updated
