Installing make in ubuntu

Hi. I have a problem in run make in ubuntu.
I recently tried to run a program which need to be run ‘make’.
therefore, I installed run by typing sudo apt install make.
after doing it, I ran 'make, but it kept showing the same error message.

kangin97@DESKTOP-AM7HJCM:/mnt/d/TRUST4$ make
g++ -O3    -c -o main.o main.cpp
make: g++: Command not found
make: *** [<builtin>: main.o] Error 127

I already tried several solutions found from google, such as

sudo apt-get updata -y

then

sudo apt-get install -y make

after doing it, the system said

kangin97@DESKTOP-AM7HJCM:/mnt/d/TRUST4$ sudo apt-get install -y make
Reading package lists... Done
Building dependency tree
Reading state information... Done
make is already the newest version (4.2.1-1.2).
0 upgraded, 0 newly installed, 0 to remove and 66 not upgraded.

so, I think make is already installed correctly.
however, again, I cannot run make, and system says the same error message

kangin97@DESKTOP-AM7HJCM:/mnt/d/TRUST4$ make
g++ -O3    -c -o main.o main.cpp
make: g++: Command not found
make: *** [<builtin>: main.o] Error 127

so, what can I do now? I really need a solution for the situation.
thank you for reading this long question.

You already have make installed, the error message you see is from make:

This is make telling you it’s trying to run g++ (C++ compiler from the GNU Compiler Collection) but it’s not installed. Try installing the g++ package.

thank you very much. I installed it, and now I can run ‘make’!

1 Like

I’d encourage you to read:
https://wiki.debian.org/BuildingTutorial