installing g++ on ubuntu

 
0
 

sudo apt-get install build-essential
I tried this.

No candidate version found for g++.

No packages will be installed.

Can someone help me?

Thanks

Featured Replies in this Discussion

  • What have you got in the /etc/apt/sources.list file? Have you run 'sudo apt-get update' before trying to install build-essential?
 
0
 

For want of sounding obvious?

sudo apt-get install g++?

 
1
 

What have you got in the /etc/apt/sources.list file? Have you run 'sudo apt-get update' before trying to install build-essential?

Comments
good points
 
0
 

For want of sounding obvious?

sudo apt-get install g++?

Pakage g++ is not available, but is ref. to by another pkg. This may mean that the pkg is missing, has been obsoleted or is available from another source.
E : Pkg g++ has no installation candidate.

I also tried going thru the pkg manager (GUI tool). There were g++ pkges, I tried installing them from the list. But I got the error msg : Not installable.

Thanks

 
0
 

What have you got in the /etc/apt/sources.list file? Have you run 'sudo apt-get update' 'sudo apt-get update' before trying to install build-essential?

I ran the 'sudo apt-get update' .

Then I tried sudo apt-get install g++
It says : Pkg g++ is not available but is referred to by another pkg.
This may mean that the pkg is missing /obsoleted or is only available from another source.

Pkg G++ has no installation candidate.

Thanks

 
0
 

These are the steps I executed :

1. I ran the 'sudo apt-get update' .

2. Then I tried sudo apt-get install g++

the error message : Pkg g++ is not available but is referred to by another pkg.This may mean that the pkg is missing /obsoleted or is only available from another source.
Pkg G++ has no installation candidate.
end of error message

 
0
 

So what's in your /etc/apt/sources.list file?

 
0
 

Yes I did it !
Thanks

I ran the 'sudo apt-get update' .

Then I tried sudo apt-get install g++
It says : Pkg g++ is not available but is referred to by another pkg.
This may mean that the pkg is missing /obsoleted or is only available from another source.

Pkg G++ has no installation candidate.

Thanks

 
0
 

hello
use this
$sudo gedit /etc/apt/sources.list
when the file opened put # as the first charactre of each line save file
and put ubuntu installation cd to optical drive
then try this and it will solve your problem
$sudo apt-get install g++

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: