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

Installation error related to 'dbplyr' #14

Closed
anikaliu opened this issue Jul 25, 2021 · 6 comments
Closed

Installation error related to 'dbplyr' #14

anikaliu opened this issue Jul 25, 2021 · 6 comments

Comments

@anikaliu
Copy link

Hello:)
I'm having trouble installing liana and was wondering if you'd be able to help with that?
It seems to be related to dbplyr which I have re-installed now and works fine, so I'm not sure what is going wrong...
When I try to install it, this is the error I receive:

`> devtools::install_github('saezlab/liana')
Downloading GitHub repo saezlab/liana@HEAD
✔  checking for file ‘/tmp/Rtmp2PPIY4/remotes1ac085225ff03/saezlab-liana-965def5/DESCRIPTION’
─  preparing ‘liana’:
✔  checking DESCRIPTION meta-information ... OK
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘liana_0.0.1.tar.gz’
   
Installing package into ‘/home/al862/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package ‘liana’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Warning: replacing previous import ‘purrr::list_along’ by ‘rlang::list_along’ when loading ‘liana’
Warning: replacing previous import ‘purrr::invoke’ by ‘rlang::invoke’ when loading ‘liana’
Warning: replacing previous import ‘purrr::flatten_raw’ by ‘rlang::flatten_raw’ when loading ‘liana’
Warning: replacing previous import ‘purrr::modify’ by ‘rlang::modify’ when loading ‘liana’
Warning: replacing previous import ‘purrr::as_function’ by ‘rlang::as_function’ when loading ‘liana’
Warning: replacing previous import ‘purrr::flatten_dbl’ by ‘rlang::flatten_dbl’ when loading ‘liana’
Warning: replacing previous import ‘purrr::flatten_lgl’ by ‘rlang::flatten_lgl’ when loading ‘liana’
Warning: replacing previous import ‘purrr::flatten_int’ by ‘rlang::flatten_int’ when loading ‘liana’
Warning: replacing previous import ‘purrr::%@%’ by ‘rlang::%@%’ when loading ‘liana’
Warning: replacing previous import ‘purrr::flatten_chr’ by ‘rlang::flatten_chr’ when loading ‘liana’
Warning: replacing previous import ‘purrr::splice’ by ‘rlang::splice’ when loading ‘liana’
Warning: replacing previous import ‘purrr::flatten’ by ‘rlang::flatten’ when loading ‘liana’
Warning: replacing previous import ‘purrr::prepend’ by ‘rlang::prepend’ when loading ‘liana’
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
ERROR: lazy loading failed for package ‘liana’
* removing ‘/home/al862/R/x86_64-pc-linux-gnu-library/4.0/liana’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/Rtmp2PPIY4/file1ac0894fb358/liana_0.0.1.tar.gz’ had non-zero exit status`

My session info is:

> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0

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

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

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13   magrittr_2.0.1    usethis_2.0.1     devtools_2.4.2   
 [5] pkgload_1.2.1     R6_2.5.0          rlang_0.4.11      fastmap_1.1.0    
 [9] tools_4.0.5       pkgbuild_1.2.0    sessioninfo_1.1.1 cli_3.0.1        
[13] withr_2.4.2       ellipsis_0.3.2    remotes_2.4.0     rprojroot_2.0.2  
[17] lifecycle_1.0.0   crayon_1.4.1      processx_3.5.2    purrr_0.3.4      
[21] callr_3.7.0       fs_1.5.0          ps_1.6.0          testthat_3.0.4   
[25] curl_4.3.2        memoise_2.0.0     glue_1.4.2        cachem_1.0.5     
[29] compiler_4.0.5    desc_1.3.0        prettyunits_1.1.1

As side note, someone has previously had a similar error over here: tidyverse/dbplyr#619
However, I was able to install both packages where the error was observed there.

Best wishes,
Anika

@dbdimitrov
Copy link
Collaborator

Hi Anika,

Thanks for using liana :)

Honestly, I have not seen this error and I'm not sure if I can reproduce it and hence fix it. I was also unable to find any further information than the one that you shared about it.

Perhaps, installing it in renv (i.e. a clean environment) might resolve the issue.
If you prefer I could share a renv snapshot of my own that I know is working.

Best wishes,
Daniel

@deeenes
Copy link
Member

deeenes commented Jul 26, 2021

Hi Anika,

Are all your installed packages up to date and built under the current R version? You can check by old.packages() and use update.packages() to update all.

@anikaliu
Copy link
Author

Hi Denes,
good call.. I see that "Matrix" which was pointed out as troublemaker in the link I added is outdated. However, it's a system library that I don't have rights to update on our server. Will try to find a workaround and let you know:)

@deeenes
Copy link
Member

deeenes commented Jul 27, 2021

Maybe you can install it in your home dir:

packages <- 'Matrix'
local_lib <- '~/r_packages'
.libPaths(new = local_lib)

for(pkg in packages){

    if(!require(pkg, character.only = TRUE)){

        dir.create(local_lib, showWarnings = FALSE)
        install.packages(pkg, lib = local_lib)
        library(pkg, character.only = TRUE)

    }

}

renv does this by a more systematic way (do this in your project working directory):

library(renv)
renv::install('Matrix')
renv::update('Matrix')
renv::snapshot()

@anikaliu
Copy link
Author

Hi Denes and Daniel,
all packages were updated now by the person in control of the server and it's still not working:/ Will give renv a try (probably good to start using it anyways) and will then wait for the next update:)

Thanks for you help so far,
Anika

@deeenes
Copy link
Member

deeenes commented Jul 27, 2021

I afraid renv won't make a miracle here, as all packages are already installed, it will simply copy them to your project directory. The issue can be related also to some outdated dependency outside R, C libraries such as BLAS, lxml, etc.

You are getting the error during installation. To see better what's going on, you could try to load the package and report a traceback:

mkdir liana_tmp
cd liana_tmp
git clone --depth 1 https://github.com/saezlab/liana .
R

And:

library(devtools)
load_all()
# error happens
traceback()

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