> tkplot(g)
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.15/Resources/library/tcltk/libs/x86_64/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.15/Resources/library/tcltk/libs/x86_64/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.5.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/2.15/Resources/library/tcltk/libs/x86_64/tcltk.so
Reason: image not found
Error in tkplot(g) : tcl/tk library not available
There are other functions that depend on Tcl/Tk as well. It's particularly annoying that you don't see the problem when you install or even load a library, but only when you try to use a function that depends on Tcl/Tk.
Fortunately, there's an easy solution. You need these two things:
- X Windows for Mac OS X. You may already have this. If not, install it.
- A Tcl/Tk installation that actually works. This will do the trick. Just install!
After you have these two installed, things should work. I didn't even have to restart R.
> tkplot(g)
Loading required package: tcltk
Loading Tcl/Tk interface ... done
9 comments:
Thanks so much! Fixed it straight away. Saved me hours of time.
That fixed my problem with "qvalue" package.
Thanks!
Thank you it's work for me!
I have follow your instructions...but it didn't work for me. I recently updated R. Do you think that can be related? I was able to use packages that now I can't. Any suggestions?
Hi Anonymous! I don't know what your problem is!
Sorry I did not explain myself better. I have the following error from R when I try to use one package from R.
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: system2("otool", c("-L", shQuote(DLL)), stdout = TRUE)
error: error in running command
Error: package or namespace load failed for ‘vegan’
sh: otool: command not found
I was able to use this package before I updated to the newest R version. I downloaded what you suggested in your post, but it is still giving me this error.
Cheers!!
I have the same problem Veronica. I am trying to use geoR package The error is
sh: otool: command not found
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: system2("otool", c("-L", shQuote(DLL)), stdout = TRUE)
error: error in running command
Error: package or namespace load failed for ‘geoR’
I already downloaded and installed the packages that you suggested, but I still have the same problem. What can I do?
I have the same problem as Veronica and Maggy, installation did not resolve it. Weird.
Thank you!!!
Post a Comment