title: Installing g++ 7.0.1 on Debian 8.7
body: <p>I have been trying for quite some time to install g++ 7 on my Debian machine. I was able to install it quite easily on my mac (as homebrew had a formula for it). However I cannot seem to find a way to install it on Linux.</p>
  
  <p><a href="https://unix.stackexchange.com/questions/334888/how-install-g-4-9-on-debian-stretch">This individual had a thread</a> on installing g++ 4.9, and changing the url he gave led me <a href="http://ftp.us.debian.org/debian/pool/main/g/gcc-7/" rel="noreferrer">to this page</a>, which seems to be in the right direction... But I imagine installing it this way might lead to a few potential problems down the road when I wish to update these packages.</p>
  
  <p>Is there a source I'm missing? Or is there maybe a place where I can download and compile everything I need to get it running?</p>
  
  <p>Thank you for your help.</p>
  
  <p>Helpful Data:<br>
  My kernel is x86_64 Linux 3.16.0-4-amd64.</p>
  
  <p>Edit: After following Dietrich's advice, I am now met with a new error:</p>
  
  <pre><code>Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:
  
  The following packages have unmet dependencies:
   gcc-7 : Depends: cpp-7 (= 7-20170316-1) but it is not going to be installed
           Depends: libcc1-0 (&gt;= 7-20170316-1) but it is not going to be installed
           Depends: binutils (&gt;= 2.28) but 2.25-5+deb8u1 is to be installed
           Depends: libgcc-7-dev (= 7-20170316-1) but it is not going to be installed
           Depends: libisl15 (&gt;= 0.15) but it is not installable
           Depends: libmpfr4 (&gt;= 3.1.3) but 3.1.2-2 is to be installed
           Depends: libstdc++6 (&gt;= 5) but 4.9.2-10 is to be installed
  E: Unable to correct problems, you have held broken packages.
  </code></pre>
  
  <p>This is how my sources.list is set up:</p>
  
  <pre><code>#------------------------------------------------------------------------------#
  #                   OFFICIAL DEBIAN REPOS                    
  #------------------------------------------------------------------------------#
  
  ###### Debian Main Repos
  deb http://ftp.us.debian.org/debian/ jessie main contrib non-free 
  deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free 
  
  ###### Debian Update Repos
  deb http://security.debian.org/ jessie/updates main contrib non-free 
  deb http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free 
  deb-src http://security.debian.org/ jessie/updates main contrib non-free 
  deb-src http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free 
  
  ###### For ffmpeg
  deb http://www.deb-multimedia.org jessie main non-free
  
  ###### For gcc-7 (Experimental)
  deb http://httpredir.debian.org/debian experimental main
  </code></pre>
  
  <p>I'm guessing this is, as you said, a problem with me being on Debian stable? What would I need to do in order to fix this error, while remaining on stable?</p>
  
  <p>Edit 2: Okay, so I figured out that last error. I just had to add go through for every individual dependency that gave my trouble and install it using apt-get install -t testing . Thank you to everyone who replied. You were all very helpful.</p>