joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
569 stars 187 forks source link

installation problem with R Studio v 4.2.2 #1662

Closed midwesternmouse closed 1 year ago

midwesternmouse commented 1 year ago

Hi all, I'm trying to download phyloseq, and hitting some problems. I'm using this code to download it:

BiocManager::install('phyloseq')
library(phyloseq)

I have successfully downloaded other packages using BiocManager (sp. dada2), so I don't think the problem is there.

The error I get when I try to run the previous code is this:

> BiocManager::install('phyloseq')
'getOption("repos")' replaces Bioconductor standard
repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2
  (2022-10-31)
Installing package(s) 'phyloseq'
also installing the dependency ‘igraph’

  There is a binary version available but the source
  version is later:
       binary source needs_compilation
igraph  1.3.5  1.4.0              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source packages ‘igraph’, ‘phyloseq’

trying URL 'https://cran.rstudio.com/src/contrib/igraph_1.4.0.tar.gz'
Content type 'application/x-gzip' length 2911035 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/phyloseq_1.42.0.tar.gz'
Content type 'application/x-gzip' length 5732951 bytes (5.5 MB)
==================================================
downloaded 5.5 MB

Error: 1:34: unexpected symbol
1: local({  r <- getOption("repos") r
                                     ^
Execution halted
Warning in install.packages(...) :
  installation of package ‘igraph’ had non-zero exit status
Error: 1:34: unexpected symbol
1: local({  r <- getOption("repos") r
                                     ^
Execution halted
Warning in install.packages(...) :
  installation of package ‘phyloseq’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/g3/8fjwzq2s56d38cn7ncbvq_f80000gn/T/RtmpRRoLnC/downloaded_packages’
Old packages: 'ggplot2', 'lubridate', 'RcppArmadillo', 'readr',
  'readxl'
Update all/some/none? [a/s/n]: 
a

  There are binary versions available but the source
  versions are later:
                  binary     source needs_compilation
ggplot2            3.4.0      3.4.1             FALSE
lubridate          1.9.1      1.9.2              TRUE
RcppArmadillo 0.11.4.3.1 0.11.4.4.0              TRUE
readr              2.1.3      2.1.4              TRUE
readxl             1.4.1      1.4.2              TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
installing the source packages ‘ggplot2’, ‘lubridate’, ‘RcppArmadillo’, ‘readr’, ‘readxl’

trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.4.1.tar.gz'
Content type 'application/x-gzip' length 3150856 bytes (3.0 MB)
==================================================
downloaded 3.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/lubridate_1.9.2.tar.gz'
Content type 'application/x-gzip' length 427200 bytes (417 KB)
==================================================
downloaded 417 KB

trying URL 'https://cran.rstudio.com/src/contrib/RcppArmadillo_0.11.4.4.0.tar.gz'
Content type 'application/x-gzip' length 1369752 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

trying URL 'https://cran.rstudio.com/src/contrib/readr_2.1.4.tar.gz'
Content type 'application/x-gzip' length 298083 bytes (291 KB)
==================================================
downloaded 291 KB

trying URL 'https://cran.rstudio.com/src/contrib/readxl_1.4.2.tar.gz'
Content type 'application/x-gzip' length 2091835 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

Error: 1:34: unexpected symbol
1: local({  r <- getOption("repos") r
                                     ^
Execution halted
Warning in install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘ggplot2’ had non-zero exit status
Error: 1:34: unexpected symbol
1: local({  r <- getOption("repos") r
                                     ^
Execution halted
Warning in install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘lubridate’ had non-zero exit status
Error: 1:34: unexpected symbol
1: local({  r <- getOption("repos") r
                                     ^
Execution halted
Warning in install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘RcppArmadillo’ had non-zero exit status
Error: 1:34: unexpected symbol
1: local({  r <- getOption("repos") r
                                     ^
Execution halted
Warning in install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘readr’ had non-zero exit status
Error: 1:34: unexpected symbol
1: local({  r <- getOption("repos") r
                                     ^
Execution halted
Warning in install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘readxl’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/g3/8fjwzq2s56d38cn7ncbvq_f80000gn/T/RtmpRRoLnC/downloaded_packages’
> library(phyloseq)
Error in library(phyloseq) : there is no package called ‘phyloseq’
> 

I've tried installing the named packages (ggplot2, lubridate, RcppArmadillo, readr, readxl) prior to installing phyloseq, but I get the same errors.

Also, my sessionInfo() is:

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

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/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  
[7] base     

loaded via a namespace (and not attached):
 [1] fansi_1.0.4         digest_0.6.31       dbplyr_2.3.0       
 [4] utf8_1.2.3          dplyr_1.1.0         assertthat_0.2.1   
 [7] R6_2.5.1            lifecycle_1.0.3     DBI_1.1.3          
[10] magrittr_2.0.3      evaluate_0.20       pillar_1.8.1       
[13] rlang_1.0.6         cli_3.6.0           rstudioapi_0.14    
[16] vctrs_0.5.2         generics_0.1.3      rmarkdown_2.20     
[19] tools_4.2.2         glue_1.6.2          yaml_2.3.7         
[22] xfun_0.37           fastmap_1.1.0       compiler_4.2.2     
[25] pkgconfig_2.0.3     BiocManager_1.30.19 htmltools_0.5.4    
[28] knitr_1.42          tidyselect_1.2.0    tibble_3.1.8  

Any help with this would be greatly appreciated! I'm really at a loss for solutions right now!

midwesternmouse commented 1 year ago

Nevermind! I got it to download successfully by simply not installing packages that needed compiling. Thanks to this forum post for the hint.