how to install g++ in ubuntu?

on giving the command sudo apt-get install build-essentials
it asks for password then the following is displayed

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package build-essentials

How about build-essential (not plural but singular) ... :wink:

i tried build-essential............it is the same

What's in your sources.list? What's the result of apt-get update? Are there any other error messages?

You've created a thread like this before, right? :slight_smile:
sudo apt-get install build-essential not working

Are you familiar with what a software repository is in Linux?

In Ubuntu, 'apt-get' or 'aptitude' is known as the package manager.
This package manager installs packages for you, among other things.
It knows what packages are available thanks to a cached file (usually in xml) stored on your hard disk.
It generates this cache file by searching the repositories everytime you run `sdo apt-get update`
The list of repositories is stored in the text file: /etc/apt/sources.list

What's happening with you is that the repositories you currently have don't contain the build-essential package. So you have to add the right repository to the list you already have. That's why I added that link in my post in your first thread.

Which part of this are you having a problem with? If you can tell us exactly what the problem is, I'm sure one of us, in this thread, can help you out faster.

please read here:
Ubuntu:Intrepid -
and here:
Ubuntu:Intrepid -