安装错误
library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/root/Miniconda3/lib/R/library/haven/libs/haven.so':
/root/Miniconda3/lib/R/library/haven/libs/haven.so: undefined symbol: libiconv
无法载入共享目标对象‘/home/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-readxl/00new/readxl/libs/readxl.so’::
/home/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-readxl/00new/readxl/libs/readxl.so: undefined symbol: libiconv
解决办法
withr::with_makevars(c(PKG_LIBS = "-liconv"), install.packages("haven"), assignment = "+=")
withr::with_makevars(c(PKG_LIBS = "-liconv"), install.packages("readxl"), assignment = "+=")
install.packages("tidyverse")