Looked through a few questions with similar issues and none of the solutions have worked. The issue is:
$ sudo apt-get Install g++
The following packges have unmet dependencies:
g++ : Depends:g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E:Unable to correct problems, you have held broken packages.
From other questions I tried:
sudo apt-get update
sudo app-get -f Install*
sudo apt-cache policy g++-4.8
g++-4.8: Installed: (none) Candidate: 4.8.2-19ubuntu1 Version table: 4.8.2-19ubuntu1 0 500 http://ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
$ sudo apt-get install g++-4.8
The following packages have unmet dependencies:
g++-4.8 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
Depends: gcc-4.8 (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
Depends: libstdc++-4.8-dev (= 4.8.2-19ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ apt-cache policy gcc-4.8-base gcc-4.8 libstdc++-4.8-dev; sudo apt-get install gcc-4.8-base gcc-4.8 libstdc++-4.8-dev
gcc-4.8-base and gcc-4.8 Installed=Candidate
but
libstdc++-4.8-dev:
Installed: (none)
Candidate: 4.8.2-19ubuntu1
Version Table:
4.8.2-19ubuntu1 0
500 http//:archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
I am a completely new to all this, running ubuntu off a flash drive and just need to get g++ installed. Any help would be greatly appreciated.
From suggestions tried:
sudo-apt get install aptitude
lots of errors all saying 'Could not resolve archive.ubuntu.com'
{}
button in the editor toolbar) are much more readable there and overall it's best to have everything relevant in one place. Also, comments may be deleted for various reasons.