简体   繁体   English

错误:'tcltk' 的 loadNamespace() 中的 .onLoad 失败,详细信息:调用:fun(libname, pkgname)

[英]Error : .onLoad failed in loadNamespace() for 'tcltk', details:call: fun(libname, pkgname)

Recently I have trouble librarying the package "adehabitat".最近我在库“adehabitat”包时遇到了麻烦。 I don't know what should I do to cope with the problem.我不知道我该怎么做才能解决这个问题。 Can anyone knows and offer me help?任何人都可以知道并提供帮助吗? Thanks a lot.非常感谢。

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.2 (Yosemite)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] ade4_1.7-2 sp_1.1-1  
loaded via a namespace (and not attached):
[1] tools_3.2.2     grid_3.2.2      lattice_0.20-33

> install.packages("adehabitat")
Installing package into ‘/Users/penghe/Library/R/3.2/library’
(as ‘lib’ is unspecified)
  There is a binary version available but the source version is later:
           binary source needs_compilation
adehabitat 1.8.17 1.8.18              TRUE
Do you want to install from sources the package which needs compilation?
y/n: n
trying URL 'https://mirrors.ustc.edu.cn/CRAN/bin/macosx/mavericks/contrib/3.2/adehabitat_1.8.17.tgz'
Content type 'application/octet-stream' length 2671207 bytes (2.5 MB)
==================================================
downloaded 2.5 MB
The downloaded binary packages are in
    /var/folders/qr/21mfb0t91rz475z2v8fs0c4w0000gn/T//Rtmphy4lRT/downloaded_packages

> library(adehabitat)
Loading required package: tkrplot
Loading required package: tcltk
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: X11 library is missing: install XQuartz from xquartz.macosforge.org
Error: package ‘tcltk’ could not be loaded

The critical part of the error message is error: X11 library is missing错误信息的关键部分是error: X11 library is missing

This happened to me on an R package check on a GitHub Action, which was fixed by adding this to the workflow:这发生在我对 GitHub 操作的 R 包检查时,通过将其添加到工作流程中来修复:

      - name: Install XQuartz on macOS
        if: runner.os == 'macOS'
        run: brew install xquartz --cask

On regular macOS, you may simply be able to run this to install the missing xquartz:在普通的 macOS 上,你可以简单地运行它来安装缺少的 xquartz:

brew install xquartz --cask

In general, the first thing to do when you get an error like this is to read everything that it says thoroughly. 通常,当您遇到这样的错误时,要做的第一件事就是彻底阅读其所说的所有内容。 In many cases, like this one, you will learn something that either completely solves your problem or gets you close to it. 在许多情况下,像这样的情况,您将学到一些可以完全解决您的问题或使您接近问题的东西。

Take a look at this line, near the end: 看一下这条线,在末端附近:

  error: X11 library is missing: install XQuartz from xquartz.macosforge.org

Hence, you should probably install XQuartz from that website ! 因此,您可能应该从该网站安装XQuartz

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:.onLoad在'tcltk'的loadNamespace()中失败,详细信息: - Error: .onLoad failed in loadNamespace() for 'tcltk', details: 错误“.onLoad 在 'tcltk' 的 loadNamespace() 中失败” - Error ".onLoad failed in loadNamespace() for 'tcltk'" Rcmdr错误:.onLoad在'tcltk'的loadNamespace()中失败 - Rcmdr Error : .onLoad failed in loadNamespace() for 'tcltk' 错误:“ geoR”的程序包或名称空间加载失败:.tcltk的loadNamespace()在.onLoad中失败 - Error: package or namespace load failed for ‘geoR’: .onLoad failed in loadNamespace() for 'tcltk' 'utils' 的 loadNamespace() 中的 onLoad 失败,详细信息 - onLoad failed in loadNamespace() for 'utils', details 错误:'rJava' 的 loadNamespace() 中的 .onLoad 失败,详细信息:调用:inDL(x, as.logical(local), as.logical(now), ...) - Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), …) 错误:.onLoad在'rJava'的loadNamespace()中失败,详细信息在安装软件包时 - Error : .onLoad failed in loadNamespace() for 'rJava', details while installing a package R - 错误:'rJava' 的 loadNamespace() 中的 .onLoad 失败 - R - Error : .onLoad failed in loadNamespace() for 'rJava' 安装包时,.onLoad在'rJava'的loadNamespace()中失败 - .onLoad failed in loadNamespace() for 'rJava' when installing a package 错误:loadNamespace 中“tidyverse”的包或命名空间加载失败 - Error: package or namespace load failed for ‘tidyverse’ in loadNamespace
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM