rinstallationbioconductorconflicting-libraries

Does conflicted package prevent package installation?


I want to install a package from Github. devtools and conflicted packages are installed and loaded. So, when I run the code below:

devtools::install_github("david-barnett/microViz")

the output:

Downloading GitHub repo david-barnett/microViz@HEAD These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: vctrs (0.5.1 -> 0.5.2 ) [CRAN] 5: stringi (1.7.5 -> 1.7.12 ) [CRAN] 6: magrittr (2.0.1 -> 2.0.3 ) [CRAN] 7: glue (1.5.0 -> 1.6.2 ) [CRAN] 8: cli (3.5.0 -> 3.6.0 ) [CRAN] 9: colorspace (2.0-2 -> 2.1-0 ) [CRAN] 10: iterators (1.0.13 -> 1.0.14 ) [CRAN] 11: foreach (1.5.1 -> 1.5.2 ) [CRAN] 12: crayon (1.4.2 -> 1.5.2 ) [CRAN] 13: fastmap (1.1.0 -> 1.1.1 ) [CRAN] 14: fs (1.5.0 -> 1.6.1 ) [CRAN] 15: digest (0.6.28 -> 0.6.31 ) [CRAN] 16: memoise (2.0.0 -> 2.0.1 ) [CRAN] 17: cachem (1.0.6 -> 1.0.7 ) [CRAN] 18: sass (0.4.0 -> 0.4.5 ) [CRAN] 19: jsonlite (1.7.2 -> 1.8.4 ) [CRAN] 20: htmltools (0.5.2 -> 0.5.4 ) [CRAN] 21: Rcpp (1.0.7 -> 1.0.10 ) [CRAN] 22: utf8 (1.2.2 -> 1.2.3 ) [CRAN] 23: fansi (0.5.0 -> 1.0.4 ) [CRAN] 24: cpp11 (0.4.1 -> 0.4.3 ) [CRAN] 25: tinytex (0.35 -> 0.44 ) [CRAN] 26: stringr (1.4.0 -> 1.5.0 ) [CRAN] 27: bslib (0.3.1 -> 0.4.2 ) [CRAN] 28: xfun (0.28 -> 0.37 ) [CRAN] 29: highr (0.9 -> 0.10 ) [CRAN] 30: evaluate (0.14 -> 0.20 ) [CRAN] 31: rmarkdown (2.11 -> 2.20 ) [CRAN] 32: knitr (1.36 -> 1.42 ) [CRAN] 33: yaml (2.2.1 -> 2.3.7 ) [CRAN] 34: pillar (1.6.4 -> 1.8.1 ) [CRAN] 35: generics (0.1.1 -> 0.1.3 ) [CRAN] 36: tidyselect (1.1.1 -> 1.2.0 ) [CRAN] 37: tibble (3.1.6 -> 3.2.0 ) [CRAN] 38: purrr (0.3.4 -> 1.0.1 ) [CRAN] 39: dplyr (1.0.7 -> 1.1.0 ) [CRAN] 40: RCurl (1.98-1.6 -> 1.98-1.10 ) [CRAN] 41: permute (0.9-5 -> 0.9-7 ) [CRAN] 42: viridisLite (0.4.0 -> 0.4.1 ) [CRAN] 43: RColorBrewer (1.1-2 -> 1.1-3 ) [CRAN] 44: farver (2.1.0 -> 2.1.1 ) [CRAN] 45: isoband (0.2.5 -> 0.2.7 ) [CRAN] 46: gtable (0.3.0 -> 0.3.1 ) [CRAN] 47: RcppArmad... (0.11.4.2.1 -> 0.12.0.1.0) [CRAN] 48: sp (1.4-6 -> 1.6-0 ) [CRAN] 49: plyr (1.8.6 -> 1.8.8 ) [CRAN] 50: igraph (1.2.9 -> 1.4.1 ) [CRAN] 51: ggplot2 (3.4.0 -> 3.4.1 ) [CRAN] 52: data.table (1.14.2 -> 1.14.8 ) [CRAN] 53: ape (5.6-2 -> 5.7 ) [CRAN] 54: ade4 (1.7-18 -> 1.7-22 ) [CRAN] 55: tidyr (1.1.4 -> 1.3.0 ) [CRAN] 56: backports (1.4.0 -> 1.4.1 ) [CRAN] 57: TSP (1.2-2 -> 1.2-3 ) [CRAN] 58: matrixStats (0.61.0 -> 0.63.0 ) [CRAN] 59: png (0.1-7 -> 0.1-8 ) [CRAN] 60: clue (0.3-62 -> 0.3-64 ) [CRAN] 61: commonmark (1.7 -> 1.8.1 ) [CRAN] 62: sourcetools (0.1.7 -> 0.1.7-1 ) [CRAN] 63: fontawesome (0.2.2 -> 0.5.0 ) [CRAN] 64: httpuv (1.6.5 -> 1.6.9 ) [CRAN] 65: uuid (1.0-3 -> 1.1-0 ) [CRAN] 66: htmlwidgets (1.5.4 -> 1.6.1 ) [CRAN] 67: Rtsne (0.15 -> 0.16 ) [CRAN] 68: broom (0.7.10 -> 1.0.3 ) [CRAN] 69: seriation (1.4.1 -> 1.4.2 ) [CRAN] 70: shiny (1.7.1 -> 1.7.4 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: checking for file ‘/private/var/folders/pv/2mldv52547j6ymmkpmcrmrv80000gn/T/Rtmpp9ZrBN/remotese89b1001745f/david-barnett-microViz-f4ac535/DESCRIPTION’ ... preparing ‘microViz’: checking DESCRIPTION meta-information ... installing the package to process help pages saving partial Rd database (18.3s) checking for LF line-endings in source and make files and shell scripts checking for empty or unneeded directories Removed empty directory ‘microViz/vignettes’ building ‘microViz_0.10.8.tar.gz’

system (cmd0): /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL Error: could not find function "conflict_prefer" Execution halted Warning message: In i.p(...) : installation of package ‘/var/folders/pv/2mldv52547j6ymmkpmcrmrv80000gn/T//Rtmpp9ZrBN/filee89b4f7f112e/microViz_0.10.8.tar.gz’ had non-zero exit status

I could not find much information on why this error occurs. I tried detaching conflicted, unloading it, installing package with other options. But same error occured. Weirdly, when I checked the issue on terminal as this:

R CMD INSTALL --help

Error: could not find function "conflict_prefer" Execution halted

occured again.

Session info as following:

R version 4.2.2 (2022-10-31) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.6

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

Installing from package archive file sometimes resolves the issue. Something like conflict_prefer('install_github', 'devtools') does not help too.

My question is, what is going on here?

conflicted package has been installed and used frequently. Later, I needed to install new packages, using BiocManager from GitHub. But this error occured and installation cancelled. Installing package from archive file worked sometimes. Changing R version was even more problematic, cause even archive file does not help and same I am getting the same error.

I would expect no issue to install packages, or a workaround to ignore or implement "conflicted" pacakge functions.


Solution

  • Installation using devtools runs error for some reason. Conflicted package doesn't take a part in it. Accordingly to projects github https://github.com/david-barnett/microViz/ try to use:

    install.packages(
      "microViz",
      repos = c(davidbarnett = "https://david-barnett.r-universe.dev", getOption("repos"))
    )
    

    This should work. It also requires installing dependencies which are listed on the page.