R installation of package ‘haven’ had non-zero exit status

Solved3.62K viewsR语言centos haven R
1

如题,我要安装一个软件包haven,centos7 键入安装命令后:install.packages("haven",dep=TRUE) 出现下列错误,无法安装

Error: package or namespace load failed for ‘haven’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/R/R/x86_64-redhat-linux-gnu-library/3.4/haven/libs/haven.so':
/home/R/R/x86_64-redhat-linux-gnu-library/3.4/haven/libs/haven.so:
undefined symbol: libiconv Error: loading failed Execution halted ERROR:
loading failed * removing ‘/home/R/R/x86_64-redhat-linux-gnu-library/3.4/haven’
Warning in install.packages : installation of package ‘haven’ had non-zero exit status
The downloaded source packages are in ‘/tmp/RtmpCTxd5r/downloaded_packages

google搜索说安装yum install glibc-devel,但是这个已经安装了
请问这是怎么回事?如何解决呢?
请大家多多帮忙啊,谢了_

Question is closed for new answers.
Edited question
0

withr::with_makevars(c(PKG_LIBS="-liconv"), install.packages("haven"), assignment="+=")

Edited answer
You are viewing 1 out of 1 answers, click here to view all answers.
  • R installation of package ‘haven’ had non-zero exit status已关闭评论
  • 7,463 阅读
    A+