BiocManager::install("seqinr")时报错

make: *** [surfaceArea.o] Error 1 ERROR: compilation failed for package ‘sp’ * removing ‘/share/work/biosoft/R/R-v4.2.2/lib64/R/library/sp’ * installing *source* package ‘Rcpp’ ......

make: *** [surfaceArea.o] Error 1 ERROR: compilation failed for package ‘sp’ * removing ‘/share/work/biosoft/R/R-v4.2.2/lib64/R/library/sp’ * installing *source* package ‘Rcpp’ ... ** package ‘Rcpp’ successfully unpacked and MD5 sums checked ** using staged installation ** libs g++ -std=gnu++14 -I"/share/work/biosoft/R/R-v4.2.2/lib64/R/include" -DNDEBUG -I../inst/include/ -I/share/work/biosoft/zlib/include -I/share/work/biosoft/bzip2/bzip2-v1.0.6/include/ -I/share/work/biosoft/xz/xz-v5.2.3/include -I/share/work/biosoft/pcre/pcre2-v10.36/include -I/share/work/biosoft/curl/curl-v7.47.1/include -fpic -g -O2 -c api.cpp -o api.o g++: error: unrecognized command line option ‘-std=gnu++14’ make: *** [api.o] Error 1 ERROR: compilation failed for package ‘Rcpp’ * removing ‘/share/work/biosoft/R/R-v4.2.2/lib64/R/library/Rcpp’ ERROR: dependency ‘Rcpp’ is not available for package ‘RcppArmadillo’ * removing ‘/share/work/biosoft/R/R-v4.2.2/lib64/R/library/RcppArmadillo’ ERROR: dependencies ‘sp’, ‘Rcpp’, ‘RcppArmadillo’ are not available for package ‘ade4’ * removing ‘/share/work/biosoft/R/R-v4.2.2/lib64/R/library/ade4’ ERROR: dependency ‘ade4’ is not available for package ‘seqinr’ * removing ‘/share/work/biosoft/R/R-v4.2.2/lib64/R/library/seqinr’


有些R包是高版本c编译过来的,就需要你计算机上有对应版本以上的编译器,如我这里报错‘-std=gnu++14’,

这个换算过来大概需要g++11以上,可是我当然是有这个版本的编译器的,却仍然报错,为什么呢?
attachments-2023-07-HRrSOIP764bf94d9e5365.png因为默认的mark文件设置没对,这个文件位置如下

R-v4.2.2/lib64/R/etc/Makeconf

这个目录结构用R的应该都能看懂

这就是文件的样子,画红框的两地方是需要修改的

CC是gcc,cxx是g++,都改成绝对路径就行

attachments-2023-07-nuIyfy0X64bf96411919b.png


  • 发表于 2023-07-25 17:32
  • 阅读 ( 828 )

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
xun
xun

电路元件工程师

82 篇文章

作家榜 »

  1. omicsgene 698 文章
  2. 安生水 347 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. xun 82 文章
  6. 红橙子 78 文章
  7. rzx 74 文章
  8. CORNERSTONE 72 文章