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

Failed with error: ‘package ‘S4Vectors’ required by ‘pagoo’ could not be found’ #56

Closed
MauriAndresMU1313 opened this issue Jun 14, 2022 · 14 comments

Comments

@MauriAndresMU1313
Copy link

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
@iferres
Copy link
Owner

iferres commented Jun 14, 2022

Thank you.
I think the problem is that you are using a very new R version which doesn't have those required packages available yet (sometimes it takes some time to cran to resolve all issues with package installation on newest R versions). May be you could try to downgrade R and try again. There's a R version manager which could make your life easier, although I haven't tried it yet: https://github.com/r-lib/rig
Let me know if you manage to make it work. Bests!

@iferres
Copy link
Owner

iferres commented Jun 14, 2022

Another option would be to try to install those dependencies packages from source, an then try to install pagoo again.

@MauriAndresMU1313
Copy link
Author

MauriAndresMU1313 commented Jun 14, 2022

Thank you for these alternatives, however, I tried to install pagoo on versions 3.4.4, 3.5.3 and 3.6.3, all of these versions don´t have pagoo available (that is the message from R). On another hand, 4.0.5 and 4.1.3 said:

  installation of package ‘pagoo’ had non-zero exit status

I think that the real problem is the Bioconductor packages

‘S4Vectors’, ‘Biostrings’, ‘GenomicRanges’

What version are you using right now (R)?
Do you know any alternative to pagoo that you recommend?
Do you recommend downloading each package to my local machine and install from it?

@MauriAndresMU1313
Copy link
Author

I going to install a conda environment using a specific R version that I hope works with pagoo

@iferres
Copy link
Owner

iferres commented Jun 14, 2022

Argh.. the dependency hell. I'm personally using R 4.0.5, but the continuous integration pipeline builds it on R 4.2.0 (on MacOS), so it should work.
The only thing I notice from your session is that you are using an ARM based Mac (M1 or M2), isn't it? On one side I would say there is the problem, but I notice that CRAN is able to build it for that architecture:
See:
https://cran.r-project.org/web/checks/check_results_pagoo.html

and specifically for ARM64 MacOS:

Still investigating..

@iferres
Copy link
Owner

iferres commented Jun 14, 2022

What does it says when you try to install S4Vectors?

install.packages("S4Vectors")

@MauriAndresMU1313
Copy link
Author

It said this:

Warning in install.packages :
  package ‘S4Vectors’ is not available for this version of R

So, I think that the problem maybe is (1) with the version or with (2) my macbook (m1).

@MauriAndresMU1313
Copy link
Author

However, I going to try to use a conda environment with R. I hope that works

@iferres
Copy link
Owner

iferres commented Jun 14, 2022

Apparently Bioconductor still doesn't support Apple's chip compilation yet, from what I have read.
I'm not sure if it works, but you could try to compile S4Vectors from source. The last solution I could think is to use rosetta to virtualize an x86_64 architecture on your Mac, and make a fresh installation of everything: https://support.bioconductor.org/p/9137290/
Sorry I can't help you very much.

@MauriAndresMU1313
Copy link
Author

Thank you for your time. Well, unfortunately, you are right with M1. I going to work with alternatives.

@MauriAndresMU1313
Copy link
Author

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.
What do you think about this approach (virtual environment), where doesn´t work too?

@iferres
Copy link
Owner

iferres commented Jun 15, 2022

Given that the problem is the lack of compiled binaries for that architecture, I think it is reasonable to expect it to doesn't work.

I don't have experience with Rosetta, but for what I read, it could be a good alternative, as the link I gave you above says. In this reddit thread they recommend using Rosetta also.

@aforestsomewhere
Copy link

Just chipping in that the source versions of those 3 problematic Bioconductor dependencies (‘S4Vectors’, ‘Biostrings’, ‘GenomicRanges’) seem to be resolved on R4.2.0 (architecture issue cited above notwithstanding).

BiocManager::install() was enough for S4Vectors and Biostrings.

For GenomicRanges it was necessary to compile from the source but it was pretty straightforward.

Hope that can help someone else! and thanks @iferres for developing Pagoo

@iferres
Copy link
Owner

iferres commented Nov 10, 2022

Thank you!!

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