我下载了bioconductor并尝试安装成功安装的软件包(“limma”),但是当我尝试更新bioconductor时,我不断收到与无效编译器选项有关的错误。它似乎特定于gcc,gfortran包安装没有问题。
这是输出:
[xxx]$ su -c 'R'
Password:
R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> source("http://bioconductor.org/biocLite.R")
Bioconductor version 2.11 (BiocInstaller 1.8.3), ?biocLite for help
> biocLite("BiocUpgrade")
BioC_mirror: http://bioconductor.org
Using Bioconductor version 2.11 (BiocInstaller 1.8.3), R version 2.15.
Old packages: 'Biobase', 'foreign', 'IRanges', 'lattice', 'MASS', 'Matrix',
'mvtnorm', 'nlme', 'rpart', 'survival', 'waveslim', 'wavethresh'
Update all/some/none? [a/s/n]: a
trying URL 'http://bioconductor.org/packages/2.11/bioc/src/contrib/Biobase_2.18.0.tar.gz'
Content type 'application/x-gzip' length 1913386 bytes (1.8 Mb)
opened URL
==================================================
downloaded 1.8 Mb
trying URL 'http://cran.fhcrc.org/src/contrib/foreign_0.8-52.tar.gz'
Content type 'application/x-gzip' length 318387 bytes (310 Kb)
opened URL
==================================================
downloaded 310 Kb
trying URL 'http://bioconductor.org/packages/2.11/bioc/src/contrib/IRanges_1.16.5.tar.gz'
Content type 'application/x-gzip' length 699291 bytes (682 Kb)
opened URL
==================================================
downloaded 682 Kb
trying URL 'http://cran.fhcrc.org/src/contrib/lattice_0.20-13.tar.gz'
Content type 'application/x-gzip' length 367715 bytes (359 Kb)
opened URL
==================================================
downloaded 359 Kb
trying URL 'http://cran.fhcrc.org/src/contrib/MASS_7.3-23.tar.gz'
Content type 'application/x-gzip' length 472005 bytes (460 Kb)
opened URL
==================================================
downloaded 460 Kb
trying URL 'http://cran.fhcrc.org/src/contrib/Matrix_1.0-11.tar.gz'
Content type 'application/x-gzip' length 1676392 bytes (1.6 Mb)
opened URL
==================================================
downloaded 1.6 Mb
trying URL 'http://cran.fhcrc.org/src/contrib/mvtnorm_0.9-9994.tar.gz'
Content type 'application/x-gzip' length 322279 bytes (314 Kb)
opened URL
==================================================
downloaded 314 Kb
trying URL 'http://cran.fhcrc.org/src/contrib/nlme_3.1-108.tar.gz'
Content type 'application/x-gzip' length 694594 bytes (678 Kb)
opened URL
==================================================
downloaded 678 Kb
trying URL 'http://cran.fhcrc.org/src/contrib/rpart_4.1-0.tar.gz'
Content type 'application/x-gzip' length 808365 bytes (789 Kb)
opened URL
==================================================
downloaded 789 Kb
trying URL 'http://cran.fhcrc.org/src/contrib/survival_2.37-2.tar.gz'
Content type 'application/x-gzip' length 1714302 bytes (1.6 Mb)
opened URL
==================================================
downloaded 1.6 Mb
trying URL 'http://cran.fhcrc.org/src/contrib/waveslim_1.7.1.tar.gz'
Content type 'application/x-gzip' length 703759 bytes (687 Kb)
opened URL
==================================================
downloaded 687 Kb
trying URL 'http://cran.fhcrc.org/src/contrib/wavethresh_4.6.1.tar.gz'
Content type 'application/x-gzip' length 525390 bytes (513 Kb)
opened URL
==================================================
downloaded 513 Kb
* installing *source* package ‘Biobase’ ...
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Rinit.c -o Rinit.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
Rinit.c:1: error: bad value (generic) for -mtune= switch
make: *** [Rinit.o] Error 1
ERROR: compilation failed for package ‘Biobase’
* removing ‘/usr/lib64/R/library/Biobase’
* restoring previous ‘/usr/lib64/R/library/Biobase’
* installing *source* package ‘foreign’ ...
** package ‘foreign’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c R_systat.c -o R_systat.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
R_systat.c:1: error: bad value (generic) for -mtune= switch
make: *** [R_systat.o] Error 1
ERROR: compilation failed for package ‘foreign’
* removing ‘/usr/lib64/R/library/foreign’
* restoring previous ‘/usr/lib64/R/library/foreign’
* installing *source* package ‘IRanges’ ...
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c AEbufs.c -o AEbufs.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
AEbufs.c:1: error: bad value (generic) for -mtune= switch
make: *** [AEbufs.o] Error 1
ERROR: compilation failed for package ‘IRanges’
* removing ‘/usr/lib64/R/library/IRanges’
* restoring previous ‘/usr/lib64/R/library/IRanges’
* installing *source* package ‘lattice’ ...
** package ‘lattice’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c init.c -o init.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
init.c:1: error: bad value (generic) for -mtune= switch
make: *** [init.o] Error 1
ERROR: compilation failed for package ‘lattice’
* removing ‘/usr/lib64/R/library/lattice’
* restoring previous ‘/usr/lib64/R/library/lattice’
* installing *source* package ‘MASS’ ...
** package ‘MASS’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c MASS.c -o MASS.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
MASS.c:1: error: bad value (generic) for -mtune= switch
make: *** [MASS.o] Error 1
ERROR: compilation failed for package ‘MASS’
* removing ‘/usr/lib64/R/library/MASS’
* restoring previous ‘/usr/lib64/R/library/MASS’
* installing *source* package ‘mvtnorm’ ...
** package ‘mvtnorm’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c miwa.c -o miwa.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
miwa.c:1: error: bad value (generic) for -mtune= switch
make: *** [miwa.o] Error 1
ERROR: compilation failed for package ‘mvtnorm’
* removing ‘/usr/lib64/R/library/mvtnorm’
* restoring previous ‘/usr/lib64/R/library/mvtnorm’
* installing *source* package ‘rpart’ ...
** package ‘rpart’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c anova.c -o anova.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
anova.c:1: error: bad value (generic) for -mtune= switch
make: *** [anova.o] Error 1
ERROR: compilation failed for package ‘rpart’
* removing ‘/usr/lib64/R/library/rpart’
* restoring previous ‘/usr/lib64/R/library/rpart’
* installing *source* package ‘survival’ ...
** package ‘survival’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c agexact.c -o agexact.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
agexact.c:1: error: bad value (generic) for -mtune= switch
make: *** [agexact.o] Error 1
ERROR: compilation failed for package ‘survival’
* removing ‘/usr/lib64/R/library/survival’
* restoring previous ‘/usr/lib64/R/library/survival’
* installing *source* package ‘waveslim’ ...
** package ‘waveslim’ successfully unpacked and MD5 sums checked
** libs
gfortran -m64 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack- protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules -c bell-p-w.f -o bell-p-w.o
bell-p-w.f:131.15:
MAXIT=(K+3)*ROOTN
1
Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at (1)
bell-p-w.f:344.18:
INTEGER N, I, L, K, IFAULT
1
Warning: Unused variable 'i' declared at (1)
bell-p-w.f:345.36:
DOUBLE PRECISION V(N), RN, STD, DSUM, DWSUM, ZERO, ONE,
1
Warning: Unused variable 'std' declared at (1)
bell-p-w.f:346.18:
* TWO, ZFLOAT
1
Warning: Unused variable 'zfloat' declared at (1)
bell-p-w.f: In function ‘dpss’:
bell-p-w.f:203:0: warning: ‘sum’ may be used uninitialized in this function [-Wmaybe- uninitialized]
bell-p-w.f:207:0: warning: ‘ssnorm’ may be used uninitialized in this function [-Wmaybe- uninitialized]
bell-p-w.f:203:0: warning: ‘diff’ may be used uninitialized in this function [-Wmaybe- uninitialized]
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c dwt.c -o dwt.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
dwt.c:1: error: bad value (generic) for -mtune= switch
make: *** [dwt.o] Error 1
ERROR: compilation failed for package ‘waveslim’
* removing ‘/usr/lib64/R/library/waveslim’
* restoring previous ‘/usr/lib64/R/library/waveslim’
* installing *source* package ‘Matrix’ ...
** package ‘Matrix’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -DNTIMER -I./SuiteSparse_config -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack- protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c CHMfactor.c -o CHMfactor.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
CHMfactor.c:1: error: bad value (generic) for -mtune= switch
make: *** [CHMfactor.o] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/usr/lib64/R/library/Matrix’
* restoring previous ‘/usr/lib64/R/library/Matrix’
* installing *source* package ‘nlme’ ...
** package ‘nlme’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c corStruct.c -o corStruct.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
corStruct.c:1: error: bad value (generic) for -mtune= switch
make: *** [corStruct.o] Error 1
ERROR: compilation failed for package ‘nlme’
* removing ‘/usr/lib64/R/library/nlme’
* restoring previous ‘/usr/lib64/R/library/nlme’
* installing *source* package ‘wavethresh’ ...
** package ‘wavethresh’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c WAVDE.c -o WAVDE.o
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
WAVDE.c:1: error: bad value (generic) for -mtune= switch
make: *** [WAVDE.o] Error 1
ERROR: compilation failed for package ‘wavethresh’
* removing ‘/usr/lib64/R/library/wavethresh’
* restoring previous ‘/usr/lib64/R/library/wavethresh’
The downloaded source packages are in
‘/tmp/RtmpKXUsRY/downloaded_packages’
Updating HTML index of packages in '.Library'
Making packages.html ... done
There were 13 warnings (use warnings() to see them)
我正在跑步: Linux fedora 3.6.8-2.fc17.x86_64 GCC-4.7.2-2.fc17.x86_64 R 2.15.2 但是我在/ usr / bin中看到的只是gcc34,所以我不确定。我必须用sudo启动R,因为除了包data.tables之外的所有内容,它都没有安装在目录中的权限。
答案 0 :(得分:4)
我在Ubuntu上尝试在R中安装mvtnorm时遇到了类似的问题。我收到了错误:
gcc: error: unrecognized command line option "-fstack-protector-strong"
我查看了默认使用哪个版本的gcc
which gcc
/home/ralien/anaconda3/bin/gcc
事实证明,出于某种原因,Anaconda使用的gcc,g ++和gfortran编译器非常古老:版本4.8.5。这个版本似乎不支持-fstack-protector-strong参数。
我检查了/ usr / bin中的gcc,g ++和gfortran版本,看到我的系统编译器更新,5.4左右。诀窍是通过创建
强制R使用新的编译器~/.R/Makevars
并将所有编译器的路径更改为系统版本。因此Makevars文件将包含条目:
CC=/usr/bin/gcc
CXX=/usr/bin/g++
FC=/usr/bin/gfortran
F77=/usr/bin/gfortran
然后,您可以使用R CMD INSTALL使用新版本的gcc,g ++和gfortran编译包。
或者至少这对我有用。
答案 1 :(得分:2)
修改PATH以确保找到比gcc 3.2更新的gcc编译器。
如有必要,请创建一个指向最近的链接(假设您仍希望保留gcc 3.2):
mkdir $HOME/bin
ln -s /usr/bin/gcc-VERSION $HOME/bin/gcc
export PATH=$HOME/bin:$PATH
# proceed to your normal installation
VERSION表示系统中通常使用的编译器的gcc版本