Problem with installing RQDA package since it was archived 20/05/2020

5k Views Asked by At

I receive an error when installing RQDA on Windows 10. I had run RQDA successfully, then a package wouldn't load and I deleted and tried to reinstall RQDA with these instructions: http://rqda.r-forge.r-project.org/. Since then, I receive errors pointing towards RGtk2 and GTK+. I tried loading RQDA both using the newest and older versions of R and RStudio. I tried on 3 different Windows computers.

Here is the link that shows the RQDA package was recently archived: https://cran.r-project.org/web/packages/RQDA/index.html The archive points towards requiring gWidgets, so I made sure the library of gWidgets loads successfully, which it does, as does library(gWidgetsRGtk2). I also took care to install RTools4.0 for R 4.0.0 (https://cran.r-project.org/bin/windows/Rtools/).

I made sure GTK+ is on my PATH. (Path: %GTK_BASEPATH%\bin;) (GTK_PATH: C:\GTK).

I also tried loading RQDA and dependencies manually, but that's a never ending process.

Here is the error I receive:

Failed to load RGtk2 dynamic library, attempting to install it. 
Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip
If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable
IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN
Error in getOption("encoding") : Knotenstack-Überlauf
Zusätzlich: Warnmeldung:
Failed to load RGtk2 dynamic library, attempting to install it. 
Please install GTK+ from http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip
If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable
IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN
Error: package or namespace load failed for 'RGtk2':
 .onLoad in loadNamespace() für 'RGtk2' fehlgeschlagen, Details:
  Aufruf: NULL
  Fehler: Knotenstack-Überlauf
Fehler: Paket 'RGtk2' konnte nicht geladen werden
Zusätzlich: Warnmeldung:
Failed to load RGtk2 dynamic library, attempting to install it. 
Ausführung angehalten
ERROR: lazy loading failed for package 'RQDA'
* removing 'C:/Users/haunschild/Documents/R/win-library/4.0/RQDA'
Warning in install.packages :
  installation of package ‘RQDA_0.3-1.tar.gz’ had non-zero exit status

Trying to install RGtk2, I receive the following:

Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  kann shared object 'C:/Users/haunschild/Documents/R/win-library/4.0/RGtk2/libs/x64/RGtk2.dll' nicht laden:
  LoadLibrary failure:  %1 ist keine zulässige Win32-Anwendung.

versuche URL 'http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip'
Content type 'application/zip' length 25830230 bytes (24.6 MB)
downloaded 24.6 MB

Learn more about GTK+ at http://www.gtk.org
If the package still does not load, please ensure that GTK+ is installed and that it is on your PATH environment variable
IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN
Lade nötiges Paket: cairoDevice
Warnmeldungen:
1: Failed to load RGtk2 dynamic library, attempting to install it. 
2: In dir.create(config_path, recursive = TRUE) :
  'C:\Users\haunschild\Documents\R\win-library\4.0\RGtk2\gtk\x64\etc\gtk-2.0' existiert bereits
> detach("package:RGtk2", unload = TRUE)
Fehler: Paket ‘RGtk2’ wird von ‘gWidgetsRGtk2’ benötigt, wird deshalb nicht detached ("Is needed by gWidgetsRGTk2', is therefore not detached")
> library(RGtk2)

I also tried:

pkgFile <- "RQDA_0.3-1.tar.gz"
download.file(url = url, destfile = pkgFile)

# Install dependencies

install.packages(c("DBI","RSQLite","RGtk2","gWidgets","gWidgetsRGtk2"))

# Install package
install.packages(pkgs=pkgFile, type="source", repos=NULL)

# Delete package tarball
unlink(pkgFile)

An received the same RGTk2 error loop.

Any help would be greatly appreciated! Thanks!

4

There are 4 best solutions below

0
On

These steps update the previous to install RQDA. I'm using Windows 10, and this code was run on April-17, 2021:

  1. Use R version 3.6.3, 32 bits. If possible, also install Rstudio;

  2. Run install.packages("gWidgets", repos="http://R-Forge.R-project.org");

  3. Run install.packages(c("RGtk2","igraph","plogr","bit","RSQLite","cairoDevice"),depen=T);

  4. Run library("RGtk2") . An error message will appear, asking you to install GTK+. Select it and press OK;

  5. Restart R. Then run library("RGtk2") again to see if everything is OK;

  6. Create the folder C:\GTK;

  7. Go to https://download.gnome.org/binaries/win32/gtk+/2.22/ and download the file gtk+-bundle_2.22.1-20101227_win32.zip in C:\GTK;

  8. Unpack the downloaded file in C:\GTK;

  9. Go to the System environment and add to system variables C:\GTK\bin to your PATH;

  10. Restart Windows;

  11. Run the following code: url <- "https://cran.r-project.org/src/contrib/Archive/gWidgetsRGtk2/gWidgetsRGtk2_0.0-86.1.tar.gz" pkgFile <- "gWidgetsRGtk2_0.0-86.1.tar.gz" download.file(url = url, destfile = pkgFile) install.packages(pkgs=pkgFile, type="source", repos=NULL);

  12. Finally, run install.packages("RQDA",repos="http://R-Forge.R-project.org", type="source"); RQDA version 0.2.8

  13. Enjoy!!!

0
On

FWIW, I've written a package called RQDAassist that I and my team use to help with RQDA, including installing the CRAN archive on R 4.0. Check it out and if there's any problem, do post an issue. To do the step-wise installation of RQDA

RQDAassist::install()

That's it.

Also, I noticed that active development is ongoing by RQDA maintainers, so I expect (hope) this issue to be resolved soon.

0
On

I've got RQDA working in Windows after:

install.packages(c("gWidgets", "RGtk2", "igraph","plogr","bit","RSQLite"),depen=T)

To install "gWidgetsRGtk2" it was needed:

  • Download GTK+: http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip
  • Create an empty folder like c:\opt\
  • Unzip the content of that file in the folder created. You'll have something like c:\opt\gtk+-bundle_2.22.1-20101227_win32. The name of this folder can be changed.
  • Then add c:\opt\gtk+-bundle_2.22.1-20101227_win32\bin to your PATH
  • To add the bin folder to the PATH: right-click on "My Computer" and select "Properties", then "Advanced" tab, then "Environment Variables". Select the "PATH" variable and then "Edit" Add "c:\opt\gtk+-bundle_2.22.1-20101227_win32\bin" to the items in the PATH variable.

PS. Make sure you have no other versions of GTK+ in PATH.

So You can run the following code:

url <- "https://cran.r-project.org/src/contrib/Archive/gWidgetsRGtk2/gWidgetsRGtk2_0.0-86.tar.gz"

pkgFile <- "gWidgetsRGtk2_0.0-86.tar.gz"

download.file(url = url, destfile = pkgFile)

install.packages(pkgs=pkgFile, type="source", repos=NULL)

Once the "gWidgetsRGtk2" is installed, you can run the following command to install RQDA:

install.packages("RQDA",repos="http://R-Forge.R-project.org", type="source") 

REFERENCES

https://rqda.r-forge.r-project.org/

https://github.com/krlmlr/r-appveyor/issues/48

0
On

We've been discussing this issue at : https://github.com/Ronggui/RQDA/issues/38 Some have reported success installing it and have given feedback on how to do it. Some contributors are working to port RQDA to gWidgets2. May be one of their solutions works for you. Good luck.

After I gave the answer above I tryed to install it my self and this was as far as I've got using RKWard 0.7.1b, on VM with MsWins10. https://rkward.kde.org/ with R 3.6.3 in RKWard library (I had RQDA working before. So I uninstalled RKWard and deleted the library directory on C:\Program Files): https://cran.r-project.org/bin/windows/base/old/3.6.3 and RTools35 https://cran.r-project.org/bin/windows/Rtools/history.html also installed.

install.packages(c("gWidgets", "gWidgetsRGtk2", "RGtk2", "igraph","plogr","bit","RSQLite"),depen=T)

update.packages(ask = FALSE, checkBuilt = TRUE)

library(RGtk2)

Selected GTK+ Restarted RKWard Installing ""RQDA_0.3-1.tar.gz", type = "source"", gave me an error: "Failed to load RGtk2 dynamic library, attempting to install it". But by chance, I just saw the post by @JanMarvin and it worked!!!

install.packages("https://cran.r-project.org/src/contrib/Archive/RQDA/RQDA_0.3-1.tar.gz", type = "source", INSTALL_opts = "--no-multiarch")

Then I ran:

update.packages(ask = FALSE, checkBuilt = TRUE)

And then

library (RQDA)

And it worked!! If anyone could please refine it or give other suggestions as how to install it on MsWin, would be very much appreciated! Thanks to @sjewo and @JanMarvin for their hard work!! porting this package to R 4.