2

I have the gcc installed. I can compile C programs. But I cannot compile C++ programs. If I write g++ on comd line, it says program not installed. I tried sudo apt-get install g++ It gives me a very long output, saying things like some packages cannot be installed and some are newest version already. Also tried

sudo apt-get install build-essential

It says build-essential package is not available. Also tried

sudo apt-get update

Nothing works. What to do now? How to compile g++ programs

blade19899
  • 26,994

1 Answers1

2

You have to enable main and universe repositories.

See how to do that in this question:

Problem installing build-essential on 14.04.1 LTS