In this video, we're going to install the c++ compiler
as well as CodeLite on ubuntu Linux.
Now the version of ubuntu Linux that I'm running,
I'll show you right here,
this is version 18.04.4.
This is the latest and greatest at the time of this video.
I've just installed this. So it's a clean install.
There are no compiler tools installed.
It's just clean install and update right out of the box.
And as you can see, I'm running this on an oracle VirtualBox.
Okay. So I'm going to close this, just wanted to show you what version I was warning.
And what I want to do first is I want to install the compiler tools.
So I'm going to open up a terminal session.
I'll just right click on the desktop and open terminal.
And I'm going to make this font just a little bit bigger so you can see it a little better.
And that's where we're at now. I'm assuming that if you're running ubuntu, you're pretty familiar with Linux.
So I'm going to use the advanced package tool, APT,
to install this.
The first thing we need to do is we need to type in sudo.
Be very careful
when you're doing these installations. Double check what you're typing.
Remember, when we use sudo, sudo stands for a super user do.
So you are becoming super user, which means
you have access to everything.
So you can do a lot of really good things and you can do a lot of damage
if you're not careful. So be very careful with what you type.
So the first thing I want to do is I want to type sudo APT update.
So that we can update our packages.
It's going to prompt you for your super user password,
which I've just entered. And I'm going to press enter.
And it's going to go through and update your packages. Now you can see
that all my packages are up to date.
Yours might not be in which case maybe you want to upgrade them
with sudo APT upgrade.
If you choose to, you don't have to but might as well keep them updated.
So at this point, we're ready to install
the c++ compiler.
Now I'm going to do this using build essential,
and that includes the compiler, the libraries and make.
And I'm going to clear this.
And you can see first off. If I type g++, g++ is the command
that runs the compiler.
The compiler is not installed yet.
So I'm going to get this little message here that says g++ isn't found,
but you can install it like this. So you could say sudo APT install g++.
And you could do that and then you'd have to install sudo make and so forth.
So I just want to do it all in one shot.
And what I'm going to do is again let me clear this I'm going to type sudo
apt install and then build
-essential.
Okay. So again sudo apt install
build-essential. And when I press enter,
it's going to find those packages. And it says, do you want to continue?
It's going to tell you how much disk space it's going to take and so forth.
So I'm going to say yes.
And there it goes. It's installing this package.
Now this includes the c compiler, the c++ compiler,
the libraries that we need
as well as make which is a tool that's used by code lite behind the scenes.
So it doesn't take too long, maybe a couple of minutes.
You can see it's about 65% done now. And once it's finished,
we'll test it out by typing g++.
And we should get the g++ compiler running.
Okay. So it's almost done.
It's right at 99%. It usually takes a couple of minutes. It didn't take too long.
And that's it. We're done. So I'm going to clear.
And now I'm going to type in g++
--version, press enter.
We're running g++ version 7.5. We're good to go.
Our c++ compiler is installed and it's ready.
The next step is to install CodeLite, and we're going to do that right now.
Okay. So now that we've got the c++ compiler installed on Linux, we're
we're going to install CodeLite now. So I'm going to move this terminal over here.
And I'm going to open up a browser.
I'm going to open up Firefox in this case.
And I've already gone to codelite.org.
So that's the website we want to go to codelite.org,
you can see right here.
Websites change over time as I've said before,
but we want to look for the download link.
We can see it up here, and we can also see this
big green button right here, which is the one we're going to use.
So what I'm going to do is I'm going to click on that button,
and it takes you to a page here where you can support the developers if you wish
or you could just say not now take me to the download. I'm going to go there,
and I'm going to find in the CodeLite 14.0.0,
and that's the current release as of this video.
I'm going to look for the ubuntu Linux, Debian
releases right here.
And what we're going to do is we're going to click on there.
And what we're going to do is we're just going to follow these steps
verbatim to install. And it's pretty easy to do.
I'm going to clear my terminal over here.
Be very careful again, we're using sudo here. So we want to be sure
that we type these things correctly.
Actually I'm not even going to type them, I'm just going to cut and paste them or copy and paste them.
So the first thing we want to do is we want to come right over here
and add the public key that we need.So I'm just going to copy that
and I'm going to paste it right into the terminal here
and press enter.
It's going to ask you,
well it didn't ask me for the password because I had just used it before.
So we're good here. We've got the key that we need.
Now we need to get the repository that's proper for our release of ubuntu.
I'm running ubuntu 18.04, which is bionic.
So this is the one I want right here.
And what i want to do is I want to copy this line right here.
And I want to replace the EOAN universe
with bionic universe.
Okay so depending on which version --
which distribution release of Ubuntu you're running, you could use
buster, bionic EOAN and a whole bunch of others down here
for CodeLite 13.
So what I'm going to do is I'm going to copy this guy right here.
And I'm going to change this line right here to bionic universe.
And put the quote mark at the end.
So again, what I'm typing is this line right here
except I'm using bionic in place of you in here.
Okay. So I'm going to press enter,
and it's going to go off and do its thing.
All right. Now I'm just going to say sudo apt.
Yet, you don't have to say apt-get, you could just say apt.
But I would say apt-get because I'm going to follow these directions exactly like they are
I want to update.
Again, let it do its thing. And then finally, this line right here
I'm going to say the last one which is sudo apt-get
install CodeLite.
So again, all I'm doing is following these directions.
So I'm going to press enter here,
and it's going to do its thing and install CodeLite. It's going to say do you want to continue? I'm going to say yes.
And this will take a couple of minutes.
You could see the percentage down here. It's about 20%,21%.
Just let it do its thing don't interrupt it. And when it's done,
we should have CodeLite installed.
And while we're waiting for this CodeLite, as we can see on the webpage
and I've talked about this before,
let me go to the CodeLite webpage again.
Right, here's the main page.
CodeLite is a cross platform IDE that works with c, c++,
PHP and JavaScript.
It's a very small, lightweight, very good complete
IDE and it runs across all of these platforms
which is really nice.
That means that if you learn it on one platform,
you know it on another platform. So it's really easy to switch between windows
and Linux and mac and everything else.
So we're about 62% now.
Okay. So we're done.
It took probably 4 or 5 minutes on my machine. I sped up
the video, so you wouldn't have to wait that whole time.
At this point, CodeLite's installed.
In the next video, we'll configure it so that we can write c++ programs with it.
I'll see you in the next video.