错误“ .onLoad在'tcltk'的loadNamespace()中失败”

时间:2019-01-06 20:51:45

标签: r anaconda tk cran

我对Ubuntu中的R还是很陌生。

我正在通过Anaconda在Rstudio 1.1.456中运行R(3.5.0)。
操作系统是Ubuntu 18.04。

在R studio中,我选择软件包Rcmdr:

> library("Rcmdr", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: carData
Loading required package: sandwich
Loading required package: effects
lattice theme set by effectsTheme()
See ?effectsTheme for details.
Error: package or namespace load failed for ‘Rcmdr’:
 .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: Can't find a usable init.tcl in the following directories: 
    /builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library



This probably means that Tcl wasn't installed properly.

然后我自己尝试了tcltk软件包:

> library("tcltk", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Error: package or namespace load failed for ‘tcltk’:
 .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: Can't find a usable init.tcl in the following directories: 
    /builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library



This probably means that Tcl wasn't installed properly.

在此问题后面:

Error ".onLoad failed in loadNamespace() for 'tcltk'"

> capabilities("tcltk")
tcltk 
 TRUE 

不幸的是,上面的解决方案仅适用于功能(“ tcltk”)随FALSE一起返回的情况,因此我被困在这一点上!

此外,tk软件包已显示为已安装,符合J_F在原始问题注释中的建议:

Error: .onLoad failed in loadNamespace() for 'tcltk', details:

有人可以告诉我如何解决这个问题。

0 个答案:

没有答案