Search code examples
c++virtual-machinechromebook

While running the Linux vm on a Chromebook, what do I have to do to compile and run a C++ program?


So I was creating my first (noob-ish) C++ program, but when I tried to compile it gave me this.

-bash: g++: command not found
-----@penguin:~$

And I don't know how to install or fix it.


Solution

  • I don't have a chromebook, so I cannot verify:

    sudo apt update
    sudo apt upgrade
    
    sudo apt install build-essential
    sudo apt install software-properties-common
     
    sudo apt install gcc g++