This question already has an answer here:
I have recently installed ubuntu 14.04 in virtual box. Now I want to install g++ 4.7 in it. I am trying this command in terminal but its not working.
sudo apt-get install g++-4.7 Reading package list... Done Building dependency tree Reading state information... Done E: Unable to locate package g++-4.7 E: Couldn't find any package by regex 'g++-4.7'
But I find gcc was there with Ubuntu 14.04 installation itself.
How could I install g++ in ubuntu 14.04 and any version of g++ abouve 4.7.2 is fine with me.