如何在Ubuntu 18.04上修复“软件包'RcmdrMisc'不可用(对于R版本3.4.4)”

时间:2019-11-20 13:50:10

标签: r

启动时,我正在Rstudio版本1.2.5001(我在Ubuntu 18.04上)中运行rcommander 库(Rcmdr)

我得到:

Error: package or namespace load failed for ‘RcmdrMisc’ in library.dynam(lib, package, package.lib):
 shared object ‘haven.so’ not found
Error: package ‘RcmdrMisc’ could not be loaded
In addition: Warning message:
S3 methods ‘[.haven_labelled’, ‘[.haven_labelled_spss’, ‘as.data.frame.haven_labelled’, ‘as_factor.data.frame’, ‘as_factor.haven_labelled’, ‘as_factor.labelled’, ‘format.pillar_shaft_haven_labelled_chr’, ‘format.pillar_shaft_haven_labelled_num’, ‘is.na.haven_labelled_spss’, ‘print.haven_labelled’, ‘print.haven_labelled_spss’, ‘type_sum.haven_labelled’, ‘zap_formats.data.frame’, ‘zap_formats.default’, ‘zap_label.data.frame’, ‘zap_label.default’, ‘zap_labels.data.frame’, ‘zap_labels.default’, ‘zap_labels.haven_labelled’, ‘zap_labels.haven_labelled_spss’, ‘zap_missing.data.frame’, ‘zap_missing.default’, ‘zap_missing.haven_labelled’, ‘zap_missing.haven_labelled_spss’, ‘zap_widths.data.frame’, ‘zap_widths.default’ were declared in NAMESPACE but not found 

尝试install.packages(“ RcmdrMisc”)我得到:

Installing package into ‘/home/marco/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘RcmdrMisc’ is not available (for R version 3.4.4)

但是,如果我尝试使用apt-get在我的系统上安装r-cran-rcmdrmisc(1.0-7-1),我会得到:

r-cran-rcmdrmisc is already the newest version (1.0-7-1).

我不知道该如何解决该问题并运行rcommander :( 帮助吗?

1 个答案:

答案 0 :(得分:0)

谢谢大家的帮助。我现在可以成功更新R(我认为..),但是现在当我运行library(Rcmdr)

正在加载所需的包:样条 正在加载所需的软件包:RcmdrMisc 加载所需包装:汽车 错误:readRDS(pfile)中的“ car”包或命名空间加载失败:  无法读取R 3.6.1编写的工作区版本3;需要R 3.5.0或更高版本 错误:无法加载“汽车”包

再次重新启动Rstudio之后,我得到了:

readRDS(file)中的错误:   无法读取R 3.6.1编写的工作区版本3;需要R 3.5.0或更高版本

  

install.packages(“ rcmdr”)   将软件包安装到“ /home/marco/R/x86_64-pc-linux-gnu-library/3.4”   (因为未指定“ lib”)   install.packages中的警告:     软件包“ rcmdr”不可用(对于R版本3.4.4)

我很困惑:/