Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when install packages that loading dbplyr as the dependency #619

Closed
albert-ying opened this issue Mar 18, 2021 · 3 comments
Closed

Comments

@albert-ying
Copy link

@albert-ying albert-ying commented Mar 18, 2021

I encountered a weird bug while installing packages with dbplyr as a dependency

Example 1: Tune package

install.packages("tune")
trying URL 'https://cran.microsoft.com/src/contrib/tune_0.1.3.tar.gz'
Content type 'application/octet-stream' length 1056081 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

* installing *source* packagetune...
** packagetunesuccessfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
Loading required package: dbplyr
Error in completeSubclasses(classDef2, class1, obj, where) :
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
Error: package or namespace load failed fordbplyr:
 .onLoad failed in loadNamespace() for 'dbplyr', details:
  call: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
  error: error in contained classes ("character") for classident”; class definition removed fromdbplyrWarning: namespacerecipesis not available and has been replaced
by .GlobalEnv when processing objectames_wflowLoading required package: dbplyr
Error in completeSubclasses(classDef2, class1, obj, where) :
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
Error: package or namespace load failed fordbplyr:
 .onLoad failed in loadNamespace() for 'dbplyr', details:
  call: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
  error: error in contained classes ("character") for classident”; class definition removed fromdbplyrWarning: namespacerecipesis not available and has been replaced
by .GlobalEnv when processing objectames_wflow** inst
** byte-compile and prepare package for lazy loading
Error in completeSubclasses(classDef2, class1, obj, where) :
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
Error: package or namespace load failed fordbplyr:
 .onLoad failed in loadNamespace() for 'dbplyr', details:
  call: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
  error: error in contained classes ("character") for classident”; class definition removed fromdbplyrError in .requirePackage(package) :
  unable to find required packagedbplyrCalls: <Anonymous> ... .recacheSubclasses -> getClassDef -> .requirePackage
Execution halted
ERROR: lazy loading failed for packagetune* removing/home/kying/R/x86_64-pc-linux-gnu-library/4.0/tuneThe downloaded source packages are in/tmp/RtmpO11XE2/downloaded_packagesWarning message:
In install.packages("tune") :
  installation of packagetunehad non-zero exit status

Example 2: glmnet package

install.packages("glmnet")
Installing package into/home/kying/R/x86_64-pc-linux-gnu-library/4.0’
(aslibis unspecified)
trying URL 'https://cran.microsoft.com/src/contrib/glmnet_4.1-1.tar.gz'
Content type 'application/octet-stream' length 2154483 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

* installing *source* packageglmnet...
** packageglmnetsuccessfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran  -fpic  -g -O2  -c glmnet5dpclean.f -o glmnet5dpclean.o
gcc -std=gnu99 -I"/home/kying/R/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c glmnet_init.c -o glmnet_init.o
gcc -std=gnu99 -I"/home/kying/R/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c pb.c -o pb.o
gfortran  -fpic  -g -O2  -c wls.f -o wls.o
gcc -std=gnu99 -shared -L/home/kying/R/lib/R/lib -L/usr/local/lib -o glmnet.so glmnet5dpclean.o glmnet_init.o pb.o wls.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -lgfortran -lm -lquadmath -L/home/kying/R/lib/R/lib -lR
installing to /home/kying/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-glmnet/00new/glmnet/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in completeSubclasses(classDef2, class1, obj, where) :
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
Error: package or namespace load failed fordbplyr:
 .onLoad failed in loadNamespace() for 'dbplyr', details:
  call: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
  error: error in contained classes ("character") for classident”; class definition removed fromdbplyrError: package or namespace load failed forMatrixin .requirePackage(package):
 unable to find required packagedbplyrError: packageMatrixcould not be loaded
Execution halted
ERROR: lazy loading failed for packageglmnet* removing/home/kying/R/x86_64-pc-linux-gnu-library/4.0/glmnet* restoring previous/home/kying/R/x86_64-pc-linux-gnu-library/4.0/glmnetThe downloaded source packages are in/tmp/RtmpO11XE2/downloaded_packagesWarning message:
In install.packages("glmnet") :
  installation of packageglmnethad non-zero exit status

dbplyr itself can be installed with no error

> install.packages("dbplyr")
Installing package into/home/kying/R/x86_64-pc-linux-gnu-library/4.0’
(aslibis unspecified)
trying URL 'https://cran.microsoft.com/src/contrib/dbplyr_2.1.0.tar.gz'
Content type 'application/octet-stream' length 579687 bytes (566 KB)
==================================================
downloaded 566 KB

* installing *source* packagedbplyr...
** packagedbplyrsuccessfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (dbplyr)

The downloaded source packages are in/tmp/RtmpO11XE2/downloaded_packages

Do you have any thoughts that what may cause this error? Thank you!

SessionInfo

R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /home/kying/R/lib/R/lib/libRblas.so
LAPACK: /home/kying/R/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3
@albert-ying
Copy link
Author

@albert-ying albert-ying commented Mar 18, 2021

Resolved by manually install the package "Matrix"

@anikaliu
Copy link

@anikaliu anikaliu commented Jul 25, 2021

I'm having the same issue as mentioned above and wasn't able to solve this by installing and loading dbplyr and Matrix in advance. Do you have any suggestions on how to work around this?

Error in completeSubclasses(classDef2, class1, obj, where) : 
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no 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
Execution halted

@jamesdalg
Copy link

@jamesdalg jamesdalg commented Feb 11, 2022

I will affirm that this issue still occurs when using version 2.1.1.

> library(GenomicFeatures)
Loading required package: AnnotationDbi
Error in completeSubclasses(classDef2, class1, obj, where) : 
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
Error: package or namespace load failed for ‘GenomicFeatures’:
 .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’
> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    
system code page: 65001

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] InteractionSet_1.20.0       SummarizedExperiment_1.22.0 Biobase_2.52.0              MatrixGenerics_1.4.3        matrixStats_0.61.0          foreach_1.5.2               parallelsugar_0.0.0.2      
 [8] gUtils_0.2.0                data.table_1.14.2           GenomicRanges_1.44.0        GenomeInfoDb_1.28.4         IRanges_2.26.0              S4Vectors_0.30.2            BiocGenerics_0.38.0        
[15] magrittr_2.0.2             

loaded via a namespace (and not attached):
  [1] utf8_1.2.2               proto_1.0.0              tidyselect_1.1.1         lme4_1.1-28              RSQLite_2.2.9            AnnotationDbi_1.54.1     htmlwidgets_1.5.4        grid_4.1.2              
  [9] BiocParallel_1.26.2      ggtern_3.3.5             munsell_0.5.0            codetools_0.2-18         DT_0.20                  miniUI_0.1.1.1           Brobdingnag_1.2-7        colorspace_2.0-2        
 [17] knitr_1.37               rstudioapi_0.13          robustbase_0.93-9        bayesm_3.1-4             brms_2.16.3              bayesplot_1.8.1          rstan_2.21.3             repr_1.1.4              
 [25] GenomeInfoDbData_1.2.6   bit64_4.0.5              farver_2.1.0             bridgesampling_1.1-2     coda_0.19-4              vctrs_0.3.8              generics_0.1.2           xfun_0.29               
 [33] R6_2.5.1                 markdown_1.1             doParallel_1.0.17        gamm4_0.2-6              projpred_2.0.2           bitops_1.0-7             cachem_1.0.6             DelayedArray_0.18.0     
 [41] assertthat_0.2.1         promises_1.2.0.1         BiocIO_1.2.0             scales_1.1.1             gtable_0.3.0             processx_3.5.2           rlang_1.0.1              splines_4.1.2           
 [49] rtracklayer_1.52.1       checkmate_2.0.0          inline_0.3.19            yaml_2.2.2               reshape2_1.4.4           abind_1.4-5              threejs_0.3.3            crosstalk_1.2.0         
 [57] backports_1.4.1          httpuv_1.6.5             rsconnect_0.8.25         tensorA_0.36.2           tools_4.1.2              ggplot2_3.3.5            ellipsis_0.3.2           posterior_1.2.0         
 [65] ggridges_0.5.3           latex2exp_0.9.3          Rcpp_1.0.8               plyr_1.8.6               base64enc_0.1-3          progress_1.2.2           zlibbioc_1.38.0          purrr_0.3.4             
 [73] RCurl_1.98-1.6           ps_1.6.0                 prettyunits_1.1.1        zoo_1.8-9                ggrepel_0.9.1            colourpicker_1.1.1       mvtnorm_1.1-3            hms_1.1.1               
 [81] shinyjs_2.1.0            mime_0.12                xtable_1.8-4             shinystan_2.5.0          XML_3.99-0.8             gridExtra_2.3            rstantools_2.1.1         compiler_4.1.2          
 [89] tibble_3.1.6             crayon_1.4.2             minqa_1.2.4              StanHeaders_2.21.0-7     htmltools_0.5.2          mgcv_1.8-38              later_1.3.0              tidyr_1.2.0             
 [97] RcppParallel_5.1.5       DBI_1.1.2                MASS_7.3-55              boot_1.3-28              compositions_2.0-4       Matrix_1.4-0             cli_3.1.1                igraph_1.2.11           
[105] forcats_0.5.1            pkgconfig_2.0.3          GenomicAlignments_1.28.0 skimr_2.1.3              dygraphs_1.1.1.6         XVector_0.32.0           stringr_1.4.0            distributional_0.3.0    
[113] callr_3.7.0              digest_0.6.29            Biostrings_2.60.2        restfulr_0.0.13          shiny_1.7.1              Rsamtools_2.8.0          gtools_3.9.2             rjson_0.2.21            
[121] nloptr_2.0.0             lifecycle_1.0.1          nlme_3.1-155             jsonlite_1.7.3           BSgenome_1.60.0          fansi_1.0.2              pillar_1.7.0             lattice_0.20-45         
[129] loo_2.4.1                KEGGREST_1.32.0          fastmap_1.1.0            httr_1.4.2               DEoptimR_1.0-10          pkgbuild_1.3.1           glue_1.6.1               xts_0.12.1              
[137] png_0.1-7                shinythemes_1.2.0        iterators_1.0.14         bit_4.0.4                stringi_1.7.6            blob_1.2.2               memoise_2.0.1            dplyr_1.0.8             
> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants