This is a test version of Biostars. For the public version, visit https://www.biostars.org.
gfortran for phyloseq in R

Hello! I'm trying to install phyloseq. Ubuntu 18.04. R 4.4.2. And see that:

/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:10: recipe for target 'igraph.so' failed
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/home/bobii/R/x86_64-pc-linux-gnu-library/4.4/igraph’
ERROR: dependency ‘RcppArmadillo’ is not available for package ‘ade4’
* removing ‘/home/bobii/R/x86_64-pc-linux-gnu-library/4.4/ade4’
ERROR: dependencies ‘ade4’, ‘igraph’ are not available for package ‘phyloseq’
* removing ‘/home/bobii/R/x86_64-pc-linux-gnu-library/4.4/phyloseq’

But I have gfortan installed in my ubuntu:

gfortran --version
GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.

So, the question is what I do wrong? and how to fix it? Thank you!

ade4 rcpparmadillo gfortran phyloseq

Please upgrade your system, it is really old and insecure. Ubuntu LTS editions like 1804, 2004 etc have standard support for 5 years.

1 answer

Some of the solutions mentioned in the following Stackoverflow thread may not work as the OS has reached EOL.

https://stackoverflow.com/questions/6302209/building-r-package-and-error-ld-cannot-find-lgfortran

Another solution will be to create a conda env for phyloseq.

Another solution will be to create a conda env for phyloseq.

Great idea, it works perfect. Thank you!

Log in to answer this question.