Installing Compilers (G++/GCC)
The G++ and GCC should be already installed if not, follow the following steps.
Installing Compilers:
If you are running the commands from a live CD or USB then every time you boot you will need to run those commands. If you are running those commands from an operating system installed on the hard drive or USB then you will need to run those commands only once.
There are two methods to do this, we are going to cover both methods.
Requirements:
- Make sure you have an internet connection
Methods:
- Method 1:
- Open the terminal (Ctrl, Alt and T) and type in:
- Type in the following
sudo apt-get install build-essential
- Now you have G++ and GCC installed you can follow the following tutorial to Compile C/C++ in Linux
- If G++ or GCC not working or the previous command gave you error, type in the following
sudo apt-get update
sudo apt-get install build-essential
- Do step number 3 again if it is still not working type in the following (Note this will upgrade the OS to the latest version)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
- Do step number 3 again
- If it is still not working try method 2 or please contact me
Note: Method 1 also install GNU make.
- Method 2:
- Open the terminal (Ctrl, Alt and T) and type in:
- Type in the following
sudo apt-get install g++
sudo apt-get install gcc
- Now you have G++ and GCC installed you can follow the following tutorial to Compile C/C++ in Linux
- If G++ or GCC not working and you tried method 1 and 2 then please contact me