Using 'sudo apt-get install build-essentials'

Viewed 126259

I was trying to use sudo apt-get install build-essentials to install the g++ compiler on my Ubuntu Linux box. But it gave me the following message:

Reading package lists... Done

Building dependency tree
Reading state information... Done

E: Unable to locate package build-essentials

How do I fix this problem?

8 Answers

Manifest for installing rust and build-essentials on ubuntu 20.04.03

rustup self uninstall
apt-get update
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe"
apt-get -u dist-upgrade
apt install aptitude 
sudo aptitude install libc6=2.31-0ubuntu9
sudo aptitude install build-essential
apt-get update
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
rustup toolchain install nightly --allow-downgrade --profile minimal --component clippy
rustup default stable
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
sudo apt install -y cmake pkg-config libssl-dev git gcc build-essential clang libclang-dev
rustc --version
source $HOME/.cargo/env

#No tested on me Fast Installation: Install all the required dependencies with a single command. (Be patient, this can take up to 30 minutes)

curl https://getsubstrate.io -sSf | bash -s -- --fast

Finally step test:

https://doc.rust-lang.org/cargo/getting-started/first-steps.html

#ArmanRiazi.Blockchain#Substrate#Dr.GavinWood

Related