Trouble installing ggplot2 with R on Mac OS X

1,546 views
Skip to first unread message

Vivek Ramakrishna

unread,
Mar 21, 2010, 8:26:31 AM3/21/10
to ggplot2
Hello,

I am new to R and ggplot2. When I try to install the ggplot2 package,
I get the following error:

> install.packages("ggplot2")
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... Error in dyn.load(file, DLLpath =
DLLpath, ...) :
unable to load shared library '/Library/Frameworks/R.framework/
Resources/library/tcltk/libs/i386/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Resources/library/tcltk/libs/
i386/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.5.dylib
Referenced from: /Library/Frameworks/R.framework/Resources/library/
tcltk/libs/i386/tcltk.so
Reason: image not found
Error: .onLoad failed in 'loadNamespace' for 'tcltk'


I am running R version 2.10.1 (2009-12-14) on Mac OS X 10.5.6.

Am I missing a dependency or installing incorrectly? Your help is much
appreciated. Thanks!

Kasper Daniel Hansen

unread,
Mar 21, 2010, 10:38:41 AM3/21/10
to Vivek Ramakrishna, ggplot2
This is not ggplot2 related at all. You are trying to install an
add-on package, and R is trying to get you to set the package
repository through a little tcltk widget. In general you need to
install tcltk from the OS X binary (click customize) in order to fix
this.

In this case you can get around the lack of a working tcltk
installation by explicitly setting what repository you are using, for
example
R> options(repos = "http://cran.cnr.Berkeley.edu")
(this selects the Berkeley mirror which may not be what you want).

Kasper

> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> To post to this group, send email to ggp...@googlegroups.com
> To unsubscribe from this group, send email to
> ggplot2+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ggplot2
>
> To unsubscribe from this group, send email to ggplot2+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
>

Vivek Ramakrishna

unread,
Mar 22, 2010, 7:13:49 AM3/22/10
to Kasper Daniel Hansen, ggplot2
Thanks for the tip Kasper! For the record, the R installer doesn't have a customize install type, but I found the X11 tcl/tk installer and used it directly,

http://cran.r-project.org/bin/macosx/tools/tcltk-8.5.5-x11.dmg

Kasper Daniel Hansen

unread,
Mar 22, 2010, 9:50:37 AM3/22/10
to Vivek Ramakrishna, ggplot2
On Mon, Mar 22, 2010 at 7:13 AM, Vivek Ramakrishna
<vivek.ra...@gmail.com> wrote:
> Thanks for the tip Kasper! For the record, the R installer doesn't have a
> customize install type, but I found the X11 tcl/tk installer and used it

This is not strictly true, I just downloaded the binary and
doublechecked. What is true, is that the binary no longer contains
tcltk and gfortran (which is really all that matters in this case ...
)

Kasper

Reply all
Reply to author
Forward
0 new messages