Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting warnings and empty popup boxes when compiling and loading R packages that depend on tk. They say that tk was not installed correctly.

I am using homebrew, but I can't tell which package might provide a correct install of tk, or if it would conflict with the existing (but broken) installation.

What is the recommended way to install enough of tk on OSX so that an R package with tk as a dependency (e.g. RNCEP) R will compile without giving this warning?


Here is the warning that I get when trying to load an R package that depends on tk.tcl:

Warning message:
In fun(libname, pkgname) :
  Can't find a usable tk.tcl in the following directories: 

/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tk8.5/Resources/Scripts /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5 /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5/Resources/Scripts ./lib/tk8.5 ./lib/tk8.5/Resources/Scripts ~/Library/Tcl/tk8.5 ~/Library/Tcl/tk8.5/Resources/Scripts /Library/Tcl/tk8.5 /Library/Tcl/tk8.5/Resources/Scripts /System/Library/Tcl/tk8.5 /System/Library/Tcl/tk8.5/Resources/Scripts /System/Library/Tcl/8.5/tk8.5 /System/Library/Tcl/8.5/tk8.5/Resources/Scripts ~/Library/Frameworks/tk8.5 ~/Library/Frameworks/tk8.5/Resources/Scripts /Library/Frameworks/tk8.5 /Library/Frameworks/tk8.5/Resources/Scripts /System/Library/Frameworks/tk8.5 /System/Library/Frameworks/tk8.5/Resources/Scripts ./library

share|improve this question
Are you using a specific version of R? Does this article yield a workable R install? Are you asking an XY problem and really just looking to get R installed by bypassing a tk error or is getting a full tk part of the main goal? – bmike Mar 21 '13 at 20:52
@bmike I've got a workable R install (installed as a .dmg downloaded from [Rstudio](, this is just giving me warnings and empty tk boxes). It started when I used brew to install inkscape and ghostscript (both of which require X11). – Abe Mar 21 '13 at 21:06
Try installing R from homebrew - as the package writers should have sorted out issue – Mark Mar 22 '13 at 0:50
@Abe does your comment mean that you had a working R before you installed inkscape and ghostscript? – Mark Mar 22 '13 at 0:59
@Mark yes, it did work. Would it be a problem to overwrite the existing installation of R? Do I need to uninstall? – Abe Mar 22 '13 at 1:48

I am having a similar problem. The advice I have been given is to symlink the file in the location indicated in the error. R is looking for the file in the location it has indicated and throwing an error because it doesn't find it there.

share|improve this answer

Try installing tk from the ActiveState ActiveTcl binaries. If you're on Mavericks, make sure that you install ActiveTcl or greater, as there are some problems with earlier versions on Mavericks. Also, please note that ActiveTcl is not open-source software.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.