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
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
Short answer: the package database on the machine can't see a repository that actually contains the g++ binary. That usually happens because /etc/apt/sources.list has malformed or incomplete lines (so the "main" archive is not enabled) or because the Ubuntu release in use has been moved off the regular mirrors (EOL) and its archive has been relocated.
What to check (quick diagnostics)
lsb_release -sc
grep -Ev '^\s*#|^\s*$' /etc/apt/sources.list
apt-cache policy g++ Common fixes
deb), that line is invalid — repository lines must start with deb and include the mirror, codename and components. Edit the file as root after making a backup, and ensure you have at least the main and security repositories enabled for your codename.Example repository lines (replace the codename shown by the lsb_release -sc result or switch to old-releases if EOL):
deb http://archive.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse Notes tied to thread posts
Jump to Post— Member #46692For want of sounding obvious?
sudo apt-get install g++?
Jump to Post— John A 1,896What have you got in the /etc/apt/sources.list file? Have you run 'sudo apt-get update' before trying to install build-essential?
Jump to Post— John A 1,896So what's in your /etc/apt/sources.list file?
For want of sounding obvious?
sudo apt-get install g++?
What have you got in the /etc/apt/sources.list file? Have you run 'sudo apt-get update' before trying to install build-essential?
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
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
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
So what's in your /etc/apt/sources.list file?
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
So what's in your /etc/apt/sources.list file?
main restricted
deb http://us.archive.ubuntu.com/ubuntu/ intrepid universe
deb http://us.archive.ubuntu.com/ubuntu/ intrepid-updates universe
I have only these three lines.
All others have been commented out.
Thanks
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++
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.