brodieG / unitizer

Easy R Unit Tests
Other
39 stars 6 forks source link

Problems to install unitizer in Ubuntu 20.04 #274

Closed hubabe closed 3 years ago

hubabe commented 3 years ago

For several weeks I have tried to install unitizer through the command line, calling R, and from RStudio. It has been impossible! The only way to install an old version was with Synaptic. Below I provide the information that from the command line, calling R, the program throws:

`hugo@hugo-MS-7978:~$ R

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

R es un software libre y viene sin GARANTIA ALGUNA. Usted puede redistribuirlo bajo ciertas circunstancias. Escriba 'license()' o 'licence()' para detalles de distribucion.

R es un proyecto colaborativo con muchos contribuyentes. Escriba 'contributors()' para obtener más información y 'citation()' para saber cómo citar R o paquetes de R en publicaciones.

Escriba 'demo()' para demostraciones, 'help()' para el sistema on-line de ayuda, o 'help.start()' para abrir el sistema de ayuda HTML con su navegador. Escriba 'q()' para salir de R.

[Previously saved workspace restored]

install.packages("unitizer", dependencies = TRUE) Installing package into ‘/home/hugo/R/x86_64-pc-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) probando la URL 'https://cloud.r-project.org/src/contrib/unitizer_1.4.12.tar.gz' Content type 'application/x-gzip' length 693207 bytes (676 KB)

downloaded 676 KB

The downloaded source packages are in ‘/tmp/Rtmpsuul1V/downloaded_packages’ Warning message: In install.packages("unitizer", dependencies = TRUE) : installation of package ‘unitizer’ had non-zero exit status

=================================================================================================================================================

R version 4.0.3 (2020-10-10) - "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes WITHOUT ANY WARRANTY. You can redistribute it under certain circumstances. Type 'license ()' or 'license ()' for distribution details.

R is a collaborative project with many contributors. Type 'contributors ()' for more information and 'citation ()' to know how to cite R or R packages in posts.

Type 'demo ()' for demos, 'help ()' for the on-line help system, or 'help.start ()' to open the HTML help system with your browser. Type 'q ()' to exit R.

[Previously saved workspace restored]

install.packages ("unitizer", dependencies = TRUE) Installing package into '/home/hugo/R/x86_64-pc-linux-gnu-library/4.0' (as ‘lib’ is unspecified) testing the url 'https://cloud.r-project.org/src/contrib/unitizer_1.4.12.tar.gz' Content type 'application / x-gzip' length 693207 bytes (676 KB)

downloaded 676 KB

The downloaded source packages are in ‘/ Tmp / Rtmpsuul1V / downloaded_packages’ Warning message: In install.packages ("unitizer", dependencies = TRUE): installation of package ‘unitizer’ had non-zero exit status

OTHER WAY TO INSTALL UNITIZER WAS: pac <- "https://cran.r-project.org/src/contrib/Archive/unitizer/unitizer_1.4.11.tar.gz"

install.packages(pac, repos=NULL, type="source") Installing package into ‘/home/hugo/R/x86_64-pc-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) probando la URL 'https://cran.r-project.org/src/contrib/Archive/unitizer/unitizer_1.4.11.tar.gz' Content type 'application/x-gzip' length 693157 bytes (676 KB)

downloaded 676 KB

THE ONLY WAY TO INSTALL UNITIZER (OLD VERSION) WAS WITH SYNAPTIC, LIKE YOU CAN SEE IT:

find.package("unitizer") [1] "/usr/lib/R/site-library/unitizer" `

brodieG commented 3 years ago

I realize this is frustrating for you, but without access to your setup this is very difficult for me to troubleshoot. There appear to be some kind of interaction with the package dbplyr that is happening, likely because there are related s4 methods or class unions.

Will you please check this comment from your previous issue, and respond there:

hubabe commented 3 years ago

Thanks for your reply. This is answer to:

packageVersion('dplyr')
[1] ‘1.0.2’

Do you have any suggestions? Regarding the function (...) I don't know what to do with it

hubabe commented 3 years ago

Reviewing the packages that appear in front of the following titles on the page: https://cran.r-project.org/web/packages/unitizer/index.html Depends: Imports: Suggests: Reverse Suggest: The R version via the command line provides the following:

> packageVersion("methods")
[1] ‘4.0.3’
> packageVersion("knitr")
[1] ‘1.30’
> packageVersion("rmarkdown")
[1] ‘2.6’
> packageVersion("testthat")
[1] ‘3.0.1’
> packageVersion("crayon")
[1] ‘1.3.4’
> packageVersion("diffobj")
[1] ‘0.3.2’
> packageVersion("stats")
[1] ‘4.0.3’
> packageVersion("utils")
[1] ‘4.0.3’
> packageVersion("covr")
[1] ‘3.5.1’
> packageVersion("fansi")
[1] ‘0.4.1’
> packageVersion("oshka")
Error in packageVersion("oshka") : there is no package called ‘oshka’
> packageVersion("vetr")
Error in packageVersion("vetr") : there is no package called ‘vetr’
brodieG commented 3 years ago

Will you try running the following from the command line (i.e. launching R from e.g. bash in vanilla mode)?

R --vanilla -e "install.packages('unitizer', repos='https://cloud.r-project.org')"
hubabe commented 3 years ago

I ran your instruction an this is the result: `R --vanilla -e "install.packages('unitizer', repos='https://cloud.r-project.org')"

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

R es un software libre y viene sin GARANTIA ALGUNA. Usted puede redistribuirlo bajo ciertas circunstancias. Escriba 'license()' o 'licence()' para detalles de distribucion.

R es un proyecto colaborativo con muchos contribuyentes. Escriba 'contributors()' para obtener más información y 'citation()' para saber cómo citar R o paquetes de R en publicaciones.

Escriba 'demo()' para demostraciones, 'help()' para el sistema on-line de ayuda, o 'help.start()' para abrir el sistema de ayuda HTML con su navegador. Escriba 'q()' para salir de R.

install.packages('unitizer', repos='https://cloud.r-project.org') Installing package into ‘/home/hugo/R/x86_64-pc-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) probando la URL 'https://cloud.r-project.org/src/contrib/unitizer_1.4.12.tar.gz' Content type 'application/x-gzip' length 693207 bytes (676 KB)

downloaded 676 KB

The downloaded source packages are in ‘/tmp/RtmphYehse/downloaded_packages’ Warning message: In install.packages("unitizer", repos = "https://cloud.r-project.org") : installation of package ‘unitizer’ had non-zero exit status `

hubabe commented 3 years ago

I have been researching the register_s3_method function, R tells me that it doesn't exist and I find that a simulate is: registerS3method

brodieG commented 3 years ago

There is some interaction happening with dbplyr and or dplyr. I've had problems with setOldClass in the past where this type of thing happened. I suspect the problem is that dbplyr is setting an "old class" on "character", and that's wreaking havoc on everything.

Do you have dbplyr installed? Note, I'm asking about d**b**plyr, not dplyr. If not, will you install it and try the command I gave earlier? The error message strongly suggests that dbplyr is not available, but for whatever reason the S4 registration tables retain some memory of an old class defined by it.

hubabe commented 3 years ago

`find.package("dbplyr") [1] "/home/hugo/R/x86_64-pc-linux-gnu-library/4.0/dbplyr" packageVersion("dbplyr") [1] ‘2.0.0’

R --vanilla -e "install.packages('unitizer', repos='https://cloud.r-project.org')"

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R es un software libre y viene sin GARANTIA ALGUNA.
Usted puede redistribuirlo bajo ciertas circunstancias.
Escriba 'license()' o 'licence()' para detalles de distribucion.

R es un proyecto colaborativo con muchos contribuyentes.
Escriba 'contributors()' para obtener más información y
'citation()' para saber cómo citar R o paquetes de R en publicaciones.

Escriba 'demo()' para demostraciones, 'help()' para el sistema on-line de ayuda,
o 'help.start()' para abrir el sistema de ayuda HTML con su navegador.
Escriba 'q()' para salir de R.

> install.packages('unitizer', repos='https://cloud.r-project.org')
Installing package into ‘/home/hugo/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
probando la URL 'https://cloud.r-project.org/src/contrib/unitizer_1.4.12.tar.gz'
Content type 'application/x-gzip' length 693207 bytes (676 KB)
==================================================
downloaded 676 KB

* installing *source* package ‘unitizer’ ...
** package ‘unitizer’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error in completeSubclasses(classDef2, class1, obj, where) : 
  tentativa de obtener un slot "subclasses" de un objeto de una clase básica ("NULL") sin slots
Error: package or namespace load failed for ‘dbplyr’:
 .onLoad failed in loadNamespace() for 'dbplyr', details:
  call: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
  error: error in contained classes ("character") for class “ident”; class definition removed from ‘dbplyr’
Error in .requirePackage(package) : 
  unable to find required package ‘dbplyr’
Calls: <Anonymous> ... .recacheSubclasses -> getClassDef -> .requirePackage
Ejecución interrumpida
ERROR: lazy loading failed for package ‘unitizer’
* removing ‘/home/hugo/R/x86_64-pc-linux-gnu-library/4.0/unitizer’

The downloaded source packages are in
    ‘/tmp/Rtmpi2WkVF/downloaded_packages’
Warning message:
In install.packages("unitizer", repos = "https://cloud.r-project.org") :
  installation of package ‘unitizer’ had non-zero exit status
> 
> 
brodieG commented 3 years ago

I'm not familiar enough with the S4 registration mechanism to be able to debug this without a reproducible example (I can't reproduce this, but I also don't have 20.04). Last thing I can suggest to you is to try a truly clean R installation with no pre-installed packages (i.e. an empty library), and not from Rstudio (i.e. directly from your shell, invoke R), and try installing there and see if that works.

hubabe commented 3 years ago

Thanks for your help!