Cannot install package in R. Error: object ‘colMeans’ is not exported by 'namespace:MatrixGenerics'
Hi,
I am trying to install the package in R (4.2.0) using remotes::install_github('saezlab/liana')
Unfortunately I repeatedly get an error that says:
Downloading GitHub repo saezlab/liana@HEAD
Skipping 5 packages ahead of CRAN: metapod, bluster, edgeR, scater, scran
Running `R CMD build`...
* checking for file ‘/tmp/RtmpkdEnqn/remotes1f0bc67e23e7c7/saezlab-liana-6cab46c/DESCRIPTION’ ... OK
* 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.1.14.tar.gz’
Installing package into ‘/hpc/users/pothus02/.Rlib’
(as ‘lib’ is unspecified)
* installing *source* package ‘liana’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Warning: program compiled against libxml 210 using older 209
No protocol specified
No protocol specified
Error: object ‘colMeans’ is not exported by 'namespace:MatrixGenerics'
Execution halted
I tried looking into this and found similar issues with S4Vectors package. I also found this thread https://stackoverflow.com/questions/41579503/how-do-i-clear-error-object-some-function-is-not-exported-by-namespacesome that explains the NAMESPACE file might explain this issue, but when I check the file, I don't see a requirement for colMeans or MatrixGenerics.
The other potential issues seem to be with having conflicting Bioconductor package versions and that is not the case either:
> BiocManager::valid()
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package =
"BiocManager")' for details.
Replacement repositories:
CRAN: http://cran.rstudio.com/
* sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Rocky Linux 9.4 (Blue Onyx)
Matrix products: default
BLAS: /hpc/packages/minerva-rocky9/R/4.2.0/lib64/R/lib/libRblas.so
LAPACK: /hpc/packages/minerva-rocky9/R/4.2.0/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.utf-8 LC_NUMERIC=C LC_TIME=en_US.utf-8
[4] LC_COLLATE=en_US.utf-8 LC_MONETARY=en_US.utf-8 LC_MESSAGES=en_US.utf-8
[7] LC_PAPER=en_US.utf-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.utf-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] matrixStats_1.5.0
loaded via a namespace (and not attached):
[1] digest_0.6.37 dplyr_1.1.4 R6_2.6.1 lifecycle_1.0.4
[5] magrittr_2.0.3 evaluate_1.0.3 pillar_1.10.2 rlang_1.1.6
[9] cli_3.6.5 curl_6.2.2 remotes_2.5.0 rstudioapi_0.16.0
[13] vctrs_0.6.5 generics_0.1.3 rmarkdown_2.29 tools_4.2.0
[17] glue_1.8.0 xfun_0.52 yaml_2.3.10 fastmap_1.2.0
[21] compiler_4.2.0 pkgconfig_2.0.3 BiocManager_1.30.25 htmltools_0.5.8.1
[25] tidyselect_1.2.1 knitr_1.50 tibble_3.2.1
Bioconductor version '3.16'
* 0 packages out-of-date
* 9 packages too new
create a valid installation with
BiocManager::install(c(
"basilisk", "basilisk.utils", "bluster", "edgeR", "metapod", "OmnipathR", "scater", "scDblFinder",
"scran"
), update = TRUE, ask = FALSE, force = TRUE)
more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date
Warning message:
0 packages out-of-date; 9 packages too new
The other thing I could think of is that perhaps the different versions of MatrixGenerics seem to be causing an issue. I am not sure but Liana might be using an older version (like 1.8.1), while newer versions of the package are available (I have 1.10.1 installed). I tried downgrading my package version to test this theory out but that had a lot of other problems since I would have to downgrade my Bioconductor version which was affecting other package functionality.
Would appreciate any help!
Session Info:
> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Rocky Linux 9.4 (Blue Onyx)
Matrix products: default
BLAS: /hpc/packages/minerva-rocky9/R/4.2.0/lib64/R/lib/libRblas.so
LAPACK: /hpc/packages/minerva-rocky9/R/4.2.0/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.utf-8 LC_NUMERIC=C LC_TIME=en_US.utf-8
[4] LC_COLLATE=en_US.utf-8 LC_MONETARY=en_US.utf-8 LC_MESSAGES=en_US.utf-8
[7] LC_PAPER=en_US.utf-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.utf-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] matrixStats_1.5.0
loaded via a namespace (and not attached):
[1] digest_0.6.37 dplyr_1.1.4 R6_2.6.1 lifecycle_1.0.4
[5] magrittr_2.0.3 evaluate_1.0.3 pillar_1.10.2 rlang_1.1.6
[9] cli_3.6.5 curl_6.2.2 remotes_2.5.0 rstudioapi_0.16.0
[13] vctrs_0.6.5 generics_0.1.3 rmarkdown_2.29 tools_4.2.0
[17] glue_1.8.0 xfun_0.52 yaml_2.3.10 fastmap_1.2.0
[21] compiler_4.2.0 pkgconfig_2.0.3 BiocManager_1.30.25 htmltools_0.5.8.1
[25] tidyselect_1.2.1 knitr_1.50 tibble_3.2.1