satijalab / sctransform

R package for modeling single cell UMI expression data using regularized negative binomial regression
GNU General Public License v3.0
208 stars 33 forks source link

sctransform install; cannot find -lgfortran #133

Closed PiaoyangGuohai1 closed 2 years ago

PiaoyangGuohai1 commented 2 years ago

When I try to install sctransform, I got this problem. The keyword seems to is "cannot find -lgfortran" What should I do to solve it?

Thanks

* installing *source* package ‘sctransform’ ...
** package ‘sctransform’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/share/apps/R/4.1.2/lib64/R/include" -DNDEBUG  -I'/share/home/longxinyang/R/x86_64-pc-linux-gnu-library/4.1/RcppArmadillo/include' -I'/share/apps/R/4.1.2/lib64/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/share/apps/R/4.1.2/lib64/R/include" -DNDEBUG  -I'/share/home/longxinyang/R/x86_64-pc-linux-gnu-library/4.1/RcppArmadillo/include' -I'/share/apps/R/4.1.2/lib64/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -c utils.cpp -o utils.o
g++ -std=gnu++11 -shared -L/share/apps/R/4.1.2/lib64/R/lib -L/usr/local/lib64 -o sctransform.so RcppExports.o utils.o -L/share/apps/R/4.1.2/lib64/R/lib -lRlapack -L/share/apps/R/4.1.2/lib64/R/lib -lRblas -lgfortran -lm -lquadmath -L/share/apps/R/4.1.2/lib64/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [sctransform.so] Error 1
ERROR: compilation failed for package ‘sctransform’
* removing ‘/share/home/longxinyang/R/x86_64-pc-linux-gnu-library/4.1/sctransform’

The downloaded source packages are in
    ‘/tmp/RtmpH4UC35/downloaded_packages’
saketkc commented 2 years ago

You need to install gfortran. There are some pointers on this thread thread.