I am running Debian 8.1. I installed g++ via the terminal using apt-get. I then installed build-essential, and saw something in the terminal about removing g++. I freaked out a little, because I've spent the better part of two days getting Debian to actually install on this computer. I tried to use g++ again, and it was just gone. I removed what I had just downloaded, tried to install g++ again and now I get this error:The following packages have unmet dependencies:g++ : Depends: g++-4.4 (>= 4.4.5-1~) but it is not going to be installed      Depends: gcc-4.4 (>= 4.4.5-1~) but it is not going to be installedE: Unable to correct problems, you have held broken packages.I don't know what to do and I'm frustrated enough right now that I feel like my head is going to pop.The output of apt-cache policy g++ g++-4.4 gcc-4.4 isg++:  Installed: (none)  Candidate: 4:4.4.5-1  Version table:     4:4.4.5-1 0        500 ftp.us.debian.org/debian squeeze/main amd64 Packagesg++-4.4:  Installed: (none)  Candidate: 4.4.5-8  Version table:     4.4.5-8 0        500 ftp.us.debian.org/debian squeeze/main amd64 Packagesgcc-4.4:  Installed: (none)  Candidate: 4.4.5-8  Version table:     4.4.5-8 0        500 ftp.us.debian.org/debian squeeze/main amd64 Packages
I had g++, was using it, installed make, and now g++ is impossible to install
debian;g++
Since you installed Debian 8.1, your package sources should refer to jessie, not squeeze. You should edit /etc/apt/sources.list (and files in /etc/apt/sources.list.d/ referring to squeeze) and replace squeeze with jessie.Once that's done,apt-get updateapt-get -f installapt-get install build-essentialshould restore g++ (build-essential depends on g++ and make).