title: gcc error installing R packages in ubuntu 16.04
body: <p>I'm getting a <code>gcc</code>error while trying to install several R packages for example devtools and plyr give the same errors. </p>
  
  <pre><code>gcc: error: unrecognized command line option '-fstack-protector-strong'
  gcc: error: unrecognized command line option '-Wdate-time'
  /usr/lib/R/etc/Makeconf:132: recipe for target 'devtools.o' failed
  </code></pre>
  
  <p>I'm using ubuntu 16.04 and R: 3.3.2. I had a working version of R but there were issues with some libraries, so I did: 
  <code>apt-get remove r-base-core</code> and followed <a href="https://blog.terminal.com/getting-an-up-to-date-r-and-rstudio-installation-on-ubuntu/" rel="nofollow noreferrer">this</a> to re-install</p>
  
  <p>It would be great to get a set of instructions to re-install R if needed and fix the gcc error. </p>
  
  <p>BTW: I also had an anaconda version, that I've removed. </p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>$ gcc --version
  gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
  Copyright (C) 2015 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  </code></pre>