简体   繁体   English

tcltk无法加载并导致R-gui无响应或崩溃

[英]tcltk not loading and causes R-gui to become unresponsive or crash

I've run into a problem with getting tcltk to run properly on r-gui. 我在使tcltk在r-gui上正常运行时遇到了问题。 It's a required package for one of the packages (aplpack) I'd like to work with. 这是我要使用的其中一个软件包(aplpack)的必需软件包。


Preliminary Stuff 初步资料
13" Macbook Air 13英寸Macbook Air
OSX Yosemite - Version 10.10.5 OSX Yosemite-版本10.10.5
R Version 3.2.3 R版本3.2.3
R.app GUI 1.66 (6956) x86_64-apple-darwin14.5.0 R.app GUI 1.66(6956)x86_64-apple-darwin14.5.0

r and r-gui were installed via homebrew r和r-gui是通过自制程序安装的


I installed aplpack in order to use the bagplot function. 我安装了aplpack以便使用bagplot函数。 Upon loading the package I received the following output: 加载软件包后,我收到以下输出:

Loading required package: tcltk 2015-12-23 09:44:11.134 R[6529:31353] -[NSApplication _setup:]: unrecognized selector sent to instance 0x60800011b3f0 2015-12-23 09:44:11.135 R[6529:31353] *** run_REngineRmainloop: exception -[NSApplication _setup:]: unrecognized selector sent to instance 0x60800011b3f0 caught during REPL iteration. 正在加载所需的软件包:tcltk 2015-12-23 09:44:11.134 R [6529:31353]-[NSApplication _setup:]:无法识别的选择器已发送到实例0x60800011b3f0 2015-12-23 09:44:11.135 R [6529:31353] *** run_REngineRmainloop:异常-[NSApplication _setup:]:无法识别的选择器发送到REPL迭代期间捕获的实例0x60800011b3f0。 Update to the latest GUI version and consider reporting this properly (see FAQ) if it persists and is not known. 更新到最新的GUI版本,如果持续存在并且未知,请考虑适当地报告此错误(请参阅FAQ)。 Consider saving your work soon in case this develops into a problem. 考虑尽快保存您的工作,以防出现问题。

The session became unresponsive and I had to force quit. 会议变得反应迟钝,我不得不强迫退出。

To try and solve the problem, I checked to see if tcltk was installed: 为了尝试解决该问题,我检查了是否安装了tcltk:

 > capabilities()["tcltk"] 

tcltk tcltk
TRUE 真正

It was also available via the package manager but trying to load it, both through the gui and using library("tcltk") caused R to become unresponsive and resulted in an identical error: 也可以通过包管理器使用它,但是尝试通过gui并使用library(“ tcltk”)加载它,导致R变得无响应,并导致相同的错误:

2015-12-23 09:49:24.370 R[6571:33844] -[NSApplication _setup:]: unrecognized selector sent to instance 0x608000108f70 2015-12-23 09:49:24.370 R[6571:33844] *** run_REngineRmainloop: exception -[NSApplication _setup:]: unrecognized selector sent to instance 0x608000108f70 caught during REPL iteration. 2015-12-23 09:49:24.370 R [6571:33844]-[NSApplication _setup:]:无法识别的选择器已发送到实例0x608000108f70 2015-12-23 09:49:24.370 R [6571:33844] *** run_REngineRmainloop:异常-[NSApplication _setup:]:发送到实例0x608000108f70的无法识别的选择器在REPL迭代期间被捕获。 Update to the latest GUI version and consider reporting this properly (see FAQ) if it persists and is not known. 更新到最新的GUI版本,如果持续存在并且未知,请考虑适当地报告此错误(请参阅FAQ)。 Consider saving your work soon in case this develops into a problem. 考虑尽快保存您的工作,以防出现问题。

Some googling led me to do the following: 谷歌搜索导致我执行以下操作:

  • uninstall r-gui via homebrew 通过自制软件卸载r-gui
  • uninstall r via homebrew 通过自制软件卸载R
  • download and install the most recent version of xquartz 下载并安装最新版本的xquartz
  • installed homebrew/dupes/tcl-tk (which I thought was supposed to fix the issue) 安装了homebrew / dupes / tcl-tk(我认为应该可以解决此问题)
  • ran brew update 运行酿造更新
  • ran brew upgrade 冲泡升级
  • ran brew doctor 跑了冲泡医生
  • installed r via homebrew 通过自制软件安装
  • installed r-gui via homebrew 通过自制软件安装了r-gui

After taking the above steps, I'm still running into the same issue as before. 完成上述步骤后,我仍然遇到与以前相同的问题。 Here is the output of sessionInfo(): 这是sessionInfo()的输出:

sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin14.5.0 (64-bit) Running under: OS X 10.10.5 (Yosemite) sessionInfo()R版本3.2.3(2015-12-10)平台:x86_64-apple-darwin14.5.0(64位)运行于:OS X 10.10.5(Yosemite)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 区域设置:[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 附加的基本软件包:[1]统计图形grDevices utils
datasets methods base 数据集方法库

Following the advice in the Mac OSX FAQ (to attempt to replicate the issue), I opened the r in terminal and was able to not only load tcltk, but also aplpack: 遵循Mac OSX FAQ中的建议(尝试重现问题),我在终端中打开了r,不仅能够加载tcltk,而且还可以加载aplpack:

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin14.5.0 (64-bit) R版本3.2.3(2015-12-10)-“木制圣诞树”版权所有(C)2015 R统计计算平台基金会:x86_64-apple-darwin14.5.0(64位)

R is free software and comes with ABSOLUTELY NO WARRANTY. R是免费软件,并且绝对不提供保证。 You are welcome to redistribute it under certain conditions. 欢迎您在某些情况下重新分发它。 Type 'license()' or 'licence()' for distribution details. 输入“ license()”或“ licence()”以获取分发详细信息。

Natural language support but running in an English locale 自然语言支持,但以英语语言环境运行

R is a collaborative project with many contributors. R是与许多贡献者合作的项目。 Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. 键入“ contributors()”以获取更多信息,并键入“ citation()”以获取如何引用出版物中的R或R软件包。

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. 对于某些演示,请输入“ demo()”,对于在线帮助,请输入“ help()”,对于HTML浏览器界面,请输入“ help.start()”以提供帮助。 Type 'q()' to quit R. 输入“ q()”退出R。

sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin14.5.0 (64-bit) Running under: OS X 10.10.5 (Yosemite) sessionInfo()R版本3.2.3(2015-12-10)平台:x86_64-apple-darwin14.5.0(64位)运行于:OS X 10.10.5(Yosemite)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 区域设置:[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 附加的基本软件包:[1]统计图形grDevices utils
datasets methods base 数据集方法库

library("aplpack") Loading required package: tcltk sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin14.5.0 (64-bit) Running under: OS X 10.10.5 (Yosemite) library(“ aplpack”)正在加载必需的软件包:tcltk sessionInfo()R版本3.2.3(2015-12-10)平台:x86_64-apple-darwin14.5.0(64位)在以下操作系统下运行:OS X 10.10.5(Yosemite )

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 区域设置:[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] tcltk stats graphics grDevices utils datasets methods [8] base 附加的基本软件包:[1] tcltk统计信息图形grDevices utils数据集方法[8]基本

other attached packages: [1] aplpack_1.3.0 其他附带的软件包:[1] aplpack_1.3.0


I believe that the issue with loading tcltk is interfering with loading aplpack and that something in R.app/r-gui is not playing nicely with tcltk. 我相信加载tcltk的问题会干扰加载aplpack,并且R.app/r-gui中的某些内容与tcltk不能很好地配合使用。

To my understanding 据我了解

install.packages("tcltk")

Returns 返回

package 'tcltk' is not available (for R version 3.2.3) 软件包“ tcltk”不可用(对于R版本3.2.3)

A work around would be to use the previous version of R which is compatible with tcltk. 解决方法是使用与tcltk兼容的R的早期版本。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM