Skip to content

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

@albert-ying

Description

@albert-ying

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions