Very靠谱解决include/except.h:15:32: error: conflicting declaration ‘typedef struct Except_Fra报错

问题

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")
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值