2

I have been unable to install "rattle" on my Mac. Tried installing the packages separately, tried installing with dependencies set to true, but all to no avail. I have installed Xquartz, compilers, etc.

I'd appreciate it if anyone could point me in the right direction. Thanks!

> version
               _                           
platform       x86_64-apple-darwin15.6.0   
arch           x86_64                      
os             darwin15.6.0                
system         x86_64, darwin15.6.0        
status                                     
major          3                           
minor          4.1                         
year           2017                        
month          06                          
day            30                          
svn rev        72865                       
language       R                           
version.string R version 3.4.1 (2017-06-30)
nickname       Single Candle               
> 
> install.packages("rattle")
also installing the dependency ‘RGtk2’

Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘RGtk2’
Do you want to attempt to install these from sources?
y/n: y
installing the source packages ‘RGtk2’, ‘rattle’

trying URL 'https://cran.rstudio.com/src/contrib/RGtk2_2.20.33.tar.gz'
Content type 'application/x-gzip' length 2792938 bytes (2.7 MB)
==================================================
downloaded 2.7 MB

trying URL 'https://cran.rstudio.com/src/contrib/rattle_4.1.0.tar.gz'
Content type 'application/x-gzip' length 2665410 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

* installing *source* package ‘RGtk2’ ...
** package ‘RGtk2’ successfully unpacked and MD5 sums checked
checking for pkg-config... no
checking for INTROSPECTION... no
checking for GTK... no
configure: error: GTK version 2.8.0 required
ERROR: configuration failed for package ‘RGtk2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RGtk2’
Warning in install.packages :
  installation of package ‘RGtk2’ had non-zero exit status
ERROR: dependency ‘RGtk2’ is not available for package ‘rattle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rattle’
Warning in install.packages :
  installation of package ‘rattle’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/1n/3vkxyt2j5c58wnq85_lsn24w0000gn/T/RtmpvykPQP/downloaded_packages’
> 

This is what I get when I try to install RGTK2:

Rgtk.c:7:10: fatal error: 'gdk/gdkx.h' file not found
#include <gdk/gdkx.h>
         ^
1 error generated.
make: *** [Rgtk.o] Error 1
ERROR: compilation failed for package ‘RGtk2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RGtk2’
Warning in install.packages :
  installation of package ‘RGtk2’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/1n/3vkxyt2j5c58wnq85_lsn24w0000gn/T/RtmpvykPQP/downloaded_packages’
lmo
  • 37,904
  • 9
  • 56
  • 69
Walter U.
  • 331
  • 1
  • 7
  • 18

3 Answers3

0

RGtk2 retired in December 2021, which prevented me from installing rattle. I found a solution at https://rattle.togaware.com/. However, I only tested it for Windows.


For Linux:

install.packages("https://cran.microsoft.com/snapshot/2021-12-15/src/contrib/RGtk2_2.20.36.2.tar.gz", repos=NULL)


For Windows:

install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/windows/contrib/4.1/RGtk2_2.20.36.2.zip", repos=NULL)


For Mac:

install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/macosx/contrib/4.1/RGtk2_2.20.36.2.tgz", repos=NULL)

Jan Rothkegel
  • 737
  • 3
  • 21
-2

I tried several ways to download rattle package, but only the following method worked!

Try install.packages("Cairo Device")

It should install the rattle package along with it.

0TTT0
  • 1,288
  • 1
  • 13
  • 23
-2

When I installed the rattle package in multiple ways like install rattle directly and through Cairo Device, I had same error. But it is fixed now. All I did is the following:

I had 3.4.3 version in my Mac. So, I have downloaded 3.3.3 version of R from Cran-R, just ran the installation (without any other changes) and then restarted my Mac. When I launched R Studio, Rattle was there.

P.S.: Always install the -1 version of latest software rather than upgrading to the latest version immediately after it's release (unless it is absolutely necessary).

Praveen
  • 1
  • 1