How can I know that I have g++ installed in my ubuntu? [duplicate]
By Sarah Rodriguez •
I have recently installed ubuntu 14.04 . I tried to run a c++ code by a command like this:
g++ first.cpp -o firstThen it said:
The program 'g++' is currently not installed. You can install it by typing:
sudo apt-get install g++And then I did. After typing it and pressing enter it showed a message like this:
gedit is already the newest version.
libgrail6 is already the newest version.
xserver-xorg-core is already the newest version.
libgdata13 is already the newest version
...(and many more lines like this)
Then I tried to run the same command given above again. But the terminal said again that I don't have g++ installed. What am I missing here? How to run the C++ code now?
12 Answers
To find out what compilers are installed, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
dpkg --list | grep compiler
Type "gcc" in terminal and then press Tab in your keyboard,the versions of gcc that are installed,will be shown. good luck
2More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"