You can install scMEGA via below commands:

# Install devtools
if (!requireNamespace("devtools", quietly = TRUE))
    install.packages("devtools")

# Install scMEGA
devtools::install_github("CostaLab/scMEGA", force = TRUE)
## Downloading GitHub repo CostaLab/scMEGA@HEAD
## nloptr      (2.0.3    -> 2.1.1   ) [CRAN]
## lme4        (1.1-35.4 -> 1.1-35.5) [CRAN]
## yaml        (2.3.8    -> 2.3.9   ) [CRAN]
## emmeans     (1.10.2   -> 1.10.3  ) [CRAN]
## systemfonts (1.0.5    -> 1.1.0   ) [CRAN]
## Skipping 7 packages not available: MASS, SummarizedExperiment, S4Vectors, GenomicRanges, IRanges, ComplexHeatmap, destiny
## Installing 5 packages: nloptr, lme4, yaml, emmeans, systemfonts
## Warning in i.p(...): installation of package 'nloptr' had non-zero exit status
## Warning in i.p(...): installation of package 'systemfonts' had non-zero exit
## status
## Updating HTML index of packages in '.Library'
## Making 'packages.html' ... done
## ── R CMD build ─────────────────────────────────────────────────────────────────
## * checking for file ‘/data/pinello/tmp/zl_tmp/RtmpQKUl7o/remotes16e8a7695b31/CostaLab-scMEGA-08148a6/DESCRIPTION’ ... OK
## * preparing ‘scMEGA’:
## * checking DESCRIPTION meta-information ... OK
## * cleaning src
## * checking for LF line-endings in source and make files and shell scripts
## * checking for empty or unneeded directories
## * building ‘scMEGA_1.0.2.tar.gz’
## Warning: invalid uid value replaced by that for user 'nobody'
## Warning in i.p(...): installation of package
## '/data/pinello/tmp/zl_tmp/RtmpQKUl7o/file16e8a524ce4be/scMEGA_1.0.2.tar.gz' had
## non-zero exit status
# Check session information
sessionInfo()
## R version 4.3.3 (2024-02-29)
## Platform: x86_64-conda-linux-gnu (64-bit)
## Running under: CentOS Linux 7 (Core)
## 
## Matrix products: default
## BLAS/LAPACK: /data/pinello/SHARED_SOFTWARE/anaconda_latest/envs/zl_envs/zl_scmega/lib/libopenblasp-r0.3.27.so;  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Etc/UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## loaded via a namespace (and not attached):
##  [1] miniUI_0.1.1.1    jsonlite_1.8.8    compiler_4.3.3    promises_1.3.0   
##  [5] Rcpp_1.0.12       stringr_1.5.1     callr_3.7.6       later_1.3.2      
##  [9] jquerylib_0.1.4   systemfonts_1.0.5 textshaping_0.3.7 yaml_2.3.9       
## [13] fastmap_1.2.0     mime_0.12         R6_2.5.1          curl_5.2.1       
## [17] knitr_1.47        htmlwidgets_1.6.4 desc_1.4.3        profvis_0.3.8    
## [21] shiny_1.8.1.1     bslib_0.7.0       rlang_1.1.4       stringi_1.8.4    
## [25] cachem_1.1.0      httpuv_1.6.15     xfun_0.45         fs_1.6.4         
## [29] sass_0.4.9        pkgload_1.4.0     memoise_2.0.1     cli_3.6.3        
## [33] pkgdown_2.0.9     magrittr_2.0.3    ps_1.7.6          processx_3.8.4   
## [37] digest_0.6.36     xtable_1.8-4      remotes_2.5.0     devtools_2.4.5   
## [41] lifecycle_1.0.4   vctrs_0.6.5       glue_1.7.0        evaluate_0.24.0  
## [45] urlchecker_1.0.1  sessioninfo_1.2.2 ragg_1.3.2        pkgbuild_1.4.4   
## [49] rmarkdown_2.27    purrr_1.0.2       usethis_2.2.3     tools_4.3.3      
## [53] ellipsis_0.3.2    htmltools_0.5.8.1