This question already has answers here:
Error “.onLoad failed in loadNamespace() for 'tcltk'”
(6个答案)
已关闭6年。
我试图在R中进行多个插补,并且已经安装了Amelia,并试图打开AmeliaView,但它表示需要tcltk软件包。我继续安装tcltk,但错误消息弹出如下。有人可以帮我吗?
(6个答案)
已关闭6年。
我试图在R中进行多个插补,并且已经安装了Amelia,并试图打开AmeliaView,但它表示需要tcltk软件包。我继续安装tcltk,但错误消息弹出如下。有人可以帮我吗?
> AmeliaView()
Loading required package: tcltk
Loading Tcl/Tk interface ... Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.5.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so
Reason: image not found
Error in AmeliaView() : The package 'tcltk' is required
> require(tcltk2)
Loading required package: tcltk2
Loading required package: tcltk
Loading Tcl/Tk interface ... Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.5.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so
Reason: image not found
Failed with error: ‘package 'tcltk' could not be loaded’
最佳答案
这对于在Linux上存在相同问题的人可能很有用(长时间讨论,请跳到最后以获取最终解决方案):
http://r.789695.n4.nabble.com/Where-is-the-tcltk-package-td3434915.html
关于r - 无法在R中加载软件包tcltk,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5567500/
10-09 17:08