OS: Windows 11
R version: 4.1.2
I'm starting a course on Data Science using R/RStudio and we need to install rattle package. It happens that to execute rattle I need to install RGtk2 but it was removed from CRAN repository.
I tried to install the package using Rtools4 and then this command:
install.packages("https://cran.r-project.org/src/contrib/Archive/RGtk2/RGtk2_220.127.116.11.tar.gz",repos = NULL)
This is the outcome I had:
- installing source package 'RGtk2' ...
** package 'RGtk2' successfully unpacked and MD5 sums checked
** using staged installation
"C:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-4.1.2/include" -DNDEBUG -D_R_=1 -DUSE_R=1 -mms-bitfields -I/include/gtk-2.0 -I/lib/gtk-2.0/include -I/include/atk-1.0 -I/include/cairo -I/include/pango-1.0 -I/include/glib-2.0 -I/lib/glib-2.0/include -I/include/libxml2 -I/include/gdk-pixbuf-2.0 -I/include -I. -DR_LEGACY_S_DEFS=1 -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c RGtkDataFrame.c -o RGtkDataFrame.o
In file included from ./RGtk2/atk.h:4,
./RGtk2/gobject.h:7:10: fatal error: glib.h: No such file or directory
make: *** [C:/PROGRA~1/R/R-4.1.2/etc/x64/Makeconf:238: RGtkDataFrame.o] Error 1
ERROR: compilation failed for package 'RGtk2'
- removing 'C:/Users/EduVm/Documents/R/win-library/4.1/RGtk2'
Warning in install.packages :
installation of package ‘C:/Users/EduVm/AppData/Local/Temp/Rtmp8epO4G/downloaded_packages/RGtk2_18.104.22.168.tar.gz’ had non-zero exit status
I tried installing different versions of RGtk2 with the same results. Any ideas why compilation is failed?
I found a similar issue in this topic, but it seems the installation worked by itself: https://community.rstudio.com/t/rgtk2-update-fails-on-windows-10/117977/2