【问题标题】:Error: package or namespace load failed for ‘geoR’: .onLoad failed in loadNamespace() for 'tcltk'错误:“geoR”的包或命名空间加载失败:“tcltk”的 loadNamespace() 中的 .onLoad 失败
【发布时间】:2018-01-25 18:08:33
【问题描述】:

我正在尝试在 RStudio(v1.0.153,在 Ubuntu 16.04 LTS 下运行)中使用 geoR 包(v1.7-5.2),但似乎需要重新安装一些 Tcl 库:

> library(geoR)
Error: package or namespace load failed for ‘geoR’:
 .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.

如果我从命令行启动 geoR,那么它启动正常。

> library(geoR)
--------------------------------------------------------------
 Analysis of Geostatistical Data
 For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
 geoR version 1.7-5.2 (built on 2016-05-02) is now loaded
--------------------------------------------------------------

【问题讨论】:

    标签: r spatial geostatistics geor


    【解决方案1】:

    尝试重新安装 geoR 且依赖项 = TRUE。

    install.packages("geoR",dependencies = TRUE) 
    library(geoR)
    

    【讨论】:

    • 这个错误可能是因为'tcltk'包。检查功能()[“tcltk”]
    • 我得到:> capabilities()["tcltk"]tcltk TRUE
    • 我还检查了:sudo apt-get install tcl8.6 Reading package lists... Done Building dependency tree Reading state information... Done tcl8.6 is already the newest version (8.6.5+dfsg-2). 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
    • 尝试重新安装 RStudio。我对不同的包有同样的问题。
    猜你喜欢
    • 1970-01-01
    • 2015-01-02
    • 2019-08-20
    • 2019-10-17
    • 2017-05-19
    • 1970-01-01
    相关资源
    最近更新 更多