I downloaded bioconductor and attempted to install a package (\"limma\") which installed successfully, however when I tried to update bioconductor I keep getting errors rela
Modify your PATH to make sure that a gcc compiler more recent than gcc 3.2 is found.
If necessary, create a link to the recent one (assuming you want to still keep gcc 3.2 around):
mkdir $HOME/bin
ln -s /usr/bin/gcc-VERSION $HOME/bin/gcc
export PATH=$HOME/bin:$PATH
# proceed to your normal installation
VERSION indicates the gcc version of the compiler normally used in your system
I had a similar problem trying to install mvtnorm in R on Ubuntu. I was getting the error:
gcc: error: unrecognized command line option "-fstack-protector-strong"
I looked into which version of gcc was being used by default
which gcc
/home/ralien/anaconda3/bin/gcc
It turns out that, for some reason, Anaconda uses a gcc, g++, and gfortran compiler that is really old: version 4.8.5. This version doesn't seem to support the -fstack-protector-strong argument.
I checked the gcc, g++, and gfortran version in /usr/bin and saw that my system compilers were much newer, 5.4 or so. The trick is to force R to use the new compilers by creating
~/.R/Makevars
and changing the path for ALL compilers to the system version. So the Makevars file would contain the entries:
CC=/usr/bin/gcc
CXX=/usr/bin/g++
FC=/usr/bin/gfortran
F77=/usr/bin/gfortran
You can then use R CMD INSTALL to compile the package with the new version of gcc, g++, and gfortran.
Or at least this worked for me.