const-ae / glmGamPoi

Fit Gamma-Poisson Generalized Linear Models Reliably
105 stars 15 forks source link

Unable to install the glmGamPoi package #57

Closed Kravidc closed 1 year ago

Kravidc commented 1 year ago

Dear Team,

I am trying to install the glmGamPoi package as it was recommended for seurat V5. I seem to be running into trouble at some place. I am not sure how to resolve this. Could you please help me with the same? The code and output on the RConsole is given below:

Machine details: MacOS: Sonoma 14.1.1 - Intel i7 2020 Macbook Pro

Thank You!

if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager")

BiocManager::install("glmGamPoi")

Do you want to attempt to install these from sources? (Yes/no/cancel) Yes trying URL 'https://bioconductor.org/packages/3.18/bioc/src/contrib/glmGamPoi_1.14.0.tar.gz' Content type 'application/x-gzip' length 2104349 bytes (2.0 MB)

downloaded 2.0 MB

The downloaded source packages are in ‘/private/var/folders/f_/0_5sprfx4zd_h_r8ppr1mjf00000gr/T/RtmpuS99mM/downloaded_packages’ Update all/some/none? [a/s/n]: a trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-x86_64/contrib/4.3/stringi_1.8.1.tgz' Content type 'application/x-gzip' length 14625717 bytes (13.9 MB)

downloaded 13.9 MB

The downloaded binary packages are in /var/folders/f_/0_5sprfx4zd_h_r8ppr1mjf00000gr/T//RtmpuS99mM/downloaded_packages

library(glmGamPoi)

Error in library(glmGamPoi) : there is no package called ‘glmGamPoi’

const-ae commented 1 year ago

Hi Kravidc,

sorry for the problems that you encountered and thanks for posting the full error, which helps a lot diagnosing the problem. The important line is:

ld: library 'gfortran' not found

R tries to build glmGamPoi from source, which means that you need make sure that the required compilers are available. There is a helpful overview page from CRAN at https://mac.r-project.org/tools/ listing a number of tools and the best practices for installing them.

In particular, you will need to follow the instructions at https://github.com/R-macos/gcc-12-branch/releases to install gfortran.

Let me know, if this resolves the issue or if you encounter further issues.

Best, Constantin

Kravidc commented 1 year ago

Hi Constantin,

Thank you for the quick response! I was able to install the mandatory tools mentioned in the first link you shared, and this allowed me to install the glmGamPoi package.

Thanks a lot!

Best regards, Kaushikk

const-ae commented 1 year ago

That's excellent.