issues with downloading phyloseq (R 4.3.1) MacOS

Hello, I am having significant issues installing the package phyloseq on R 4.3.1

I have tried installing using the following code:

+     install.packages("BiocManager")
+ }
> BiocManager::install("phyloseq")

and the result I am getting is as follows:

'getOption("repos")' replaces Bioconductor standard repositories, see
'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
Bioconductor version 3.17 (BiocManager 1.30.22), R 4.3.1 (2023-06-16)
Installing package(s) 'phyloseq'
installing the source package ‘phyloseq’

trying URL ''
Content type 'application/x-gzip' length 5689663 bytes (5.4 MB)
downloaded 5.4 MB

* installing *source* package ‘phyloseq’ ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘Rhdf5lib’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package ‘phyloseq’
* removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/phyloseq’

The downloaded source packages are in
Old packages: 'credentials', 'deSolve', 'foreign', 'ggeffects', 'Hmisc', 'insight',
  'knitr', 'minqa', 'performance', 'RcppArmadillo'
Update all/some/none? [a/s/n]: 
trying URL ''
Content type 'application/x-gzip' length 170632 bytes (166 KB)
downloaded 166 KB

trying URL ''
Content type 'application/x-gzip' length 2629393 bytes (2.5 MB)
downloaded 2.5 MB

trying URL ''
Content type 'application/x-gzip' length 341244 bytes (333 KB)
downloaded 333 KB

trying URL ''
Content type 'application/x-gzip' length 634011 bytes (619 KB)
downloaded 619 KB

trying URL ''
Content type 'application/x-gzip' length 3515255 bytes (3.4 MB)
downloaded 3.4 MB

trying URL ''
Content type 'application/x-gzip' length 2092645 bytes (2.0 MB)
downloaded 2.0 MB

trying URL ''
Content type 'application/x-gzip' length 1464612 bytes (1.4 MB)
downloaded 1.4 MB

trying URL ''
Content type 'application/x-gzip' length 338630 bytes (330 KB)
downloaded 330 KB

trying URL ''
Content type 'application/x-gzip' length 3037026 bytes (2.9 MB)
downloaded 2.9 MB

trying URL ''
Content type 'application/x-gzip' length 1666966 bytes (1.6 MB)
downloaded 1.6 MB

The downloaded binary packages are in
Warning message:
In install.packages(...) :
  installation of package ‘phyloseq’ had non-zero exit status

I followed this help tutorial as it best suits my specific error, yet when I get to the step to write in the terminal: which gfortran

I get the following output: gfortran not found

I have downloaded and installed the latest version of java, and I am at a loss. Please advise on how to proceed.

This issue was solved with running the following lines before installing phyloseq:

if (!require("BiocManager", quietly = TRUE))


This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.