What to do when all the installation methods for a package fail (pagoo)?
2
0
Entering edit mode
@6a86570d
Last seen 21 months ago
Chile

I´m trying to install a specific package "pagoo", so I use the following command:

# Packages
packages <- c("ape","ggplot2","vegan","philentropy", "pagoo") # Specify your packages
# Install and libraries
package.check <- lapply(
  packages,
  FUN = function(x) {
    if (!require(x, character.only = TRUE)) {
      install.packages(x, dependencies = TRUE)
      library(x, character.only = TRUE)
    }
  }
)

The last package is the problem: pagoo. When I tried to install it, there is an error:

Failed with error:  ‘package ‘S4Vectors’ required by ‘pagoo’ could not be found’
Warning in install.packages :
  dependencies ‘S4Vectors’, ‘Biostrings’, ‘GenomicRanges’, ‘BiocGenerics’, ‘DECIPHER’, ‘IRanges’ are not available

Show Traceback:
Error: package ‘S4Vectors’ required by ‘pagoo’ could not be found
5.
stop(gettextf("package %s required by %s could not be found", 
sQuote(pkg), sQuote(pkgname)), call. = FALSE, domain = NA)
4.
.getRequiredPackages2(pkgInfo, quietly = quietly)
3.
library(x, character.only = TRUE)
2.
FUN(X[[i]], ...)
1.
lapply(packages, FUN = function(x) {
if (!require(x, character.only = TRUE)) {
install.packages(x, dependencies = TRUE)
library(x, character.only = TRUE) ...

So, first I tried to install pagoo from the source (which doesn´t work), then install S4Vectors from Bioconductor (which doesn´t work too). The following warning appears:

Warning messages:
1: In install.packages(...) :
  installation of package ‘S4Vectors’ had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘igraph’ had non-zero exit status

From github (devtools::install_github('iferres/pagoo')):

ERROR: dependencies ‘S4Vectors’, ‘Biostrings’, ‘GenomicRanges’ are not available for package ‘pagoo’

In case you need to know the Bioconductor version: 3.16 Now, I don´t know how to install this package. Any new ideas?

sessionInfo( )

R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.6

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

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

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

other attached packages:
[1] BiocGenerics_0.43.0 BiocManager_1.30.18

loaded via a namespace (and not attached):
 [1] magrittr_2.0.3   splines_4.2.0    tidyselect_1.1.2 munsell_0.5.0    colorspace_2.0-3
 [6] lattice_0.20-45  R6_2.5.1         rlang_1.0.2      fansi_1.0.3      dplyr_1.0.9     
[11] tools_4.2.0      grid_4.2.0       gtable_0.3.0     nlme_3.1-157     mgcv_1.8-40     
[16] utf8_1.2.2       cli_3.3.0        ellipsis_0.3.2   tibble_3.1.7     lifecycle_1.0.1 
[21] crayon_1.5.1     Matrix_1.4-1     purrr_0.3.4      ggplot2_3.3.6    vctrs_0.4.1     
[26] glue_1.6.2       compiler_4.2.0   pillar_1.7.0     generics_0.1.2   scales_1.2.0    
[31] pkgconfig_2.0.3
S4Vectors pagoo • 2.3k views
ADD COMMENT
1
Entering edit mode
shepherl 3.8k
@lshep
Last seen 9 hours ago
United States

Sorry I missed that you are using Big Sur. Bioconductor is not providing M1 Mac binaries at this time. See the top of the release announcement: https://bioconductor.org/news/bioc_3_15_release/

You can search for multiple answers on related posts on how to install packages for m1.

ADD COMMENT
0
Entering edit mode
shepherl 3.8k
@lshep
Last seen 9 hours ago
United States

Bioconductor packages are installed with BiocManager::install not install.packages. You would have to set the repos to have access to the Bioconductor repositories. See BiocManager::repositories().
Conversely the Bioconductor BiocManager::install function handles installation of both Bioconductor and CRAN packages so if you update to that you should be all set.

ADD COMMENT
0
Entering edit mode

To add to Lori's point, BiocManager::install will also install from GitHub repos, so there's no compelling reason to install packages using any other method.

ADD REPLY
0
Entering edit mode

Well, thank you for your anwer, however using

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.15")

doesn't works for me. Maybe I´m doing something wrong? Somebody recommends that I should downgrade my R version. What do you think?

ADD REPLY
0
Entering edit mode

Can you clarify? It doesn't work for you in what way?

As for downgrading R, that's probably not what you want to do.

> library(BiocManager)
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.0 (2022-04-22 ucrt)
> install("pagoo")
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.0 (2022-04-22 ucrt)
Installing package(s) 'pagoo'
also installing the dependencies 'ps', 'processx', 'TSP', 'qap', 'gclus', 'registry', 'callr', 'seriation', 'webshot', 'egg', 'vegan', 'shinyWidgets', 'shinydashboard', 'plotly', 'heatmaply', 'dendextend', 'ggfortify'

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/ps_1.7.0.zip'
Content type 'application/zip' length 532848 bytes (520 KB)
downloaded 520 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/processx_3.6.0.zip'
Content type 'application/zip' length 773899 bytes (755 KB)
downloaded 755 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/TSP_1.2-0.zip'
Content type 'application/zip' length 1134483 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/qap_0.1-1.zip'
Content type 'application/zip' length 528181 bytes (515 KB)
downloaded 515 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/gclus_1.3.2.zip'
Content type 'application/zip' length 416351 bytes (406 KB)
downloaded 406 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/registry_0.5-1.zip'
Content type 'application/zip' length 197294 bytes (192 KB)
downloaded 192 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/callr_3.7.0.zip'
Content type 'application/zip' length 435812 bytes (425 KB)
downloaded 425 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/seriation_1.3.5.zip'
Content type 'application/zip' length 1154142 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/webshot_0.5.3.zip'
Content type 'application/zip' length 215603 bytes (210 KB)
downloaded 210 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/egg_0.4.5.zip'
Content type 'application/zip' length 832242 bytes (812 KB)
downloaded 812 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/vegan_2.6-2.zip'
Content type 'application/zip' length 3699766 bytes (3.5 MB)
downloaded 3.5 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/shinyWidgets_0.7.0.zip'
Content type 'application/zip' length 1420582 bytes (1.4 MB)
downloaded 1.4 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/shinydashboard_0.7.2.zip'
Content type 'application/zip' length 331904 bytes (324 KB)
downloaded 324 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/plotly_4.10.0.zip'
Content type 'application/zip' length 3173572 bytes (3.0 MB)
downloaded 3.0 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/heatmaply_1.3.0.zip'
Content type 'application/zip' length 1874313 bytes (1.8 MB)
downloaded 1.8 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/dendextend_1.15.2.zip'
Content type 'application/zip' length 3889045 bytes (3.7 MB)
downloaded 3.7 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/ggfortify_0.4.14.zip'
Content type 'application/zip' length 2374527 bytes (2.3 MB)
downloaded 2.3 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/pagoo_0.3.12.zip'
Content type 'application/zip' length 4703551 bytes (4.5 MB)
downloaded 4.5 MB

package 'ps' successfully unpacked and MD5 sums checked
package 'processx' successfully unpacked and MD5 sums checked
package 'TSP' successfully unpacked and MD5 sums checked
package 'qap' successfully unpacked and MD5 sums checked
package 'gclus' successfully unpacked and MD5 sums checked
package 'registry' successfully unpacked and MD5 sums checked
package 'callr' successfully unpacked and MD5 sums checked
package 'seriation' successfully unpacked and MD5 sums checked
package 'webshot' successfully unpacked and MD5 sums checked
package 'egg' successfully unpacked and MD5 sums checked
package 'vegan' successfully unpacked and MD5 sums checked
package 'shinyWidgets' successfully unpacked and MD5 sums checked
package 'shinydashboard' successfully unpacked and MD5 sums checked
package 'plotly' successfully unpacked and MD5 sums checked
package 'heatmaply' successfully unpacked and MD5 sums checked
package 'dendextend' successfully unpacked and MD5 sums checked
package 'ggfortify' successfully unpacked and MD5 sums checked
package 'pagoo' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Public\Documents\Wondershare\CreatorTemp\RtmpgJ58Rc\downloaded_packages
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.0/library
  packages:
    MASS
Old packages: 'gtools', 'igraph', 'KEGGREST', 'R.methodsS3', 'R.oo', 'RCurl',
  'XML'
Update all/some/none? [a/s/n]: n
> library(pagoo)
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min


Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    expand.grid, I, unname

Loading required package: Biostrings
Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:grDevices':

    windows

Loading required package: XVector
Loading required package: GenomeInfoDb

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: ggplot2
Registered S3 methods overwritten by 'vegan':
  method         from      
  reorder.hclust seriation 
  rev.hclust     dendextend
ADD REPLY
0
Entering edit mode

I´m using Macbook with M1, where Bioconductor (current version doesn´t work), enter link description here I created a virtual environment with conda (r version 4.2.0) and then I used:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.15")

All were good, however, when I try to install pagoo:

Warning messages:
1: In install.packages(...) :
  installation of package ‘stringi’ had non-zero exit status
2: In install.packages(...) :
  installation of package ‘RCurl’ had non-zero exit status
3: In install.packages(...) :
  installation of package ‘stringr’ had non-zero exit status
4: In install.packages(...) :
  installation of package ‘reshape2’ had non-zero exit status
5: In install.packages(...) :
  installation of package ‘GenomeInfoDb’ had non-zero exit status
6: In install.packages(...) :
  installation of package ‘Biostrings’ had non-zero exit status
7: In install.packages(...) :
  installation of package ‘GenomicRanges’ had non-zero exit status
8: In install.packages(...) :
  installation of package ‘ggfortify’ had non-zero exit status
9: In install.packages(...) :
  installation of package ‘heatmaply’ had non-zero exit status
10: In install.packages(...) :
  installation of package ‘pagoo’ had non-zero exit status

I really don't understand why doesn't work even in a virtual environment.

ADD REPLY
0
Entering edit mode

I´m using Macbook with M1, where Bioconductor (current version doesn´t work), enter link description here I created a virtual environment with conda (r version 4.2.0) and then I used:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.15")

All was good, however, when I try to install pagoo:

Warning messages:
1: In install.packages(...) :
  installation of package ‘stringi’ had non-zero exit status
2: In install.packages(...) :
  installation of package ‘RCurl’ had non-zero exit status
3: In install.packages(...) :
  installation of package ‘stringr’ had non-zero exit status
4: In install.packages(...) :
  installation of package ‘reshape2’ had non-zero exit status
5: In install.packages(...) :
  installation of package ‘GenomeInfoDb’ had non-zero exit status
6: In install.packages(...) :
  installation of package ‘Biostrings’ had non-zero exit status
7: In install.packages(...) :
  installation of package ‘GenomicRanges’ had non-zero exit status
8: In install.packages(...) :
  installation of package ‘ggfortify’ had non-zero exit status
9: In install.packages(...) :
  installation of package ‘heatmaply’ had non-zero exit status
10: In install.packages(...) :
  installation of package ‘pagoo’ had non-zero exit status

I really don't understand why doesn't work even in a virtual environment.

ADD REPLY

Login before adding your answer.

Traffic: 531 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6