问题
install.packages(“readr”)
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL ‘https://cran.rstudio.com/src/contrib/readr_1.1.1.tar.gz’
Content type ‘application/x-gzip’ length 233793 bytes (228 KB)
==================================================
downloaded 228 KB
installing source package ‘readr’ …
** package ‘readr’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/BH/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Collector.cpp -o Collector.o
In file included from /usr/local/include/assert.h:5:0,
from /usr/local/lib/R/site-library/BH/include/boost/assert.hpp:58,
from /usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:25,
from /usr/local/lib/R/site-library/BH/include/boost/shared_ptr.hpp:17,
from Collector.h:5,
from Collector.cpp:4:
/usr/local/include/except.h:15:32: error: conflicting declaration ‘typedef struct Except_Frame_T* Except_Frame_T’
typedef struct Except_Frame_T *Except_Frame_T;
^
/usr/local/include/except.h:15:16: note: prevIoUs declaration as ‘struct Except_Frame_T’
typedef struct Except_Frame_T *Except_Frame_T;
^
/usr/local/include/except.h:17:18: error: field ‘prev’ has incomplete type ‘Except_Frame_T’
Except_Frame_T prev;
^
/usr/local/include/except.h:16:8: note: deFinition of ‘struct Except_Frame_T’ is not complete until the closing brace
struct Except_Frame_T {
^
/usr/lib/R/etc/Makeconf:168: recipe for target ‘Collector.o’ Failed
make: *** [Collector.o] Error 1
ERROR: compilation Failed for package ‘readr’
removing ‘/usr/local/lib/R/site-library/readr’
Warning in install.packages :
installation of package ‘readr’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpfpHqtV/downloaded_packages’
分析
R语言安装一些包出现关于声明冲突报错,原因不在安装的R包。而是bioconda的问题,2017版之前的GMAP经常出现这问题,这是编译过程出现头文件覆盖,导致一些软件安装编译时出错。之前外网挺多类似报错。
解决办法
卸载或重装GMAP
conda uninstall gmap
conda search gmap
conda install gmap= "XXXX"
一般安装2017之后版本即可,例如2021.08.25版本
conda install gmap= 2021.08.25 -c bioconda
再安装对应R包
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("edgeR")
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。