kassambara / survminer

Survival Analysis and Visualization
https://rpkgs.datanovia.com/survminer/
509 stars 164 forks source link

Failed to install survminer #607

Closed tsengj closed 2 weeks ago

tsengj commented 2 years ago

Can't seem to install survminer. Please help

session_info()

if (!require("survminer")) install.packages("survminer", dependencies=TRUE)

logs

package ‘Matrix’ successfully unpacked and MD5 sums checked
... <many packages later>
package ‘survminer’ successfully unpacked and MD5 sums checked
...

* installing *source* package 'minqa' ...
** package 'minqa' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran  -fno-optimize-sibling-calls    -O2  -mfpmath=sse -msse2 -mstackrealign  -c altmov.f -o altmov.o
make: gfortran: No such file or directory
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:277: altmov.o] Error 127
ERROR: compilation failed for package 'minqa'
* removing 'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/minqa'
Warning in install.packages :
  installation of package ‘minqa’ had non-zero exit status
* installing *source* package 'car' ...
** package 'car' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (car)
* installing *source* package 'ggsignif' ...
** package 'ggsignif' successfully unpacked and MD5 sums checked
** using staged installation
** R
** 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 'colorspace'
Error: unable to load R code in package 'ggsignif'
Execution halted
ERROR: lazy loading failed for package 'ggsignif'
* removing 'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/ggsignif'
Warning in install.packages :
  installation of package ‘ggsignif’ had non-zero exit status
* installing *source* package 'rstpm2' ...
** package 'rstpm2' successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR -I../inst/include -I'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/RcppArmadillo/include' -I'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/BH/include'   -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c aft.cpp -o aft.o
sh: line 1: g++: command not found
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:260: aft.o] Error 127
ERROR: compilation failed for package 'rstpm2'
* removing 'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/rstpm2'
Warning in install.packages :
  installation of package ‘rstpm2’ had non-zero exit status
* installing *source* package 'markdown' ...
** package 'markdown' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc  -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG     -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c Rbase64.c -o Rbase64.o
sh: line 1: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:253: Rbase64.o] Error 127
ERROR: compilation failed for package 'markdown'
* removing 'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/markdown'
Warning in install.packages :
  installation of package ‘markdown’ had non-zero exit status

seeing that many of the libraries has been installed, i reran the same install command line.

> if (!require("survminer")) install.packages("survminer", dependencies=TRUE)
Loading required package: survminer
Loading required package: ggplot2
Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘colorspace’
Failed with error:  ‘package ‘ggplot2’ could not be loaded’
Installing package into ‘C:/Users/james.tseng/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
also installing the dependency ‘markdown’

  There is a binary version available but the source version is later:
         binary source needs_compilation
markdown    1.1    1.2              TRUE

trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/survminer_0.4.9.zip'
Content type 'application/zip' length 3227058 bytes (3.1 MB)
downloaded 3.1 MB

package ‘survminer’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\james.tseng\AppData\Local\Temp\Rtmp0i55cD\downloaded_packages
installing the source package ‘markdown’

trying URL 'http://cran.rstudio.com/src/contrib/markdown_1.2.tar.gz'
Content type 'application/x-gzip' length 80862 bytes (78 KB)
downloaded 78 KB

* installing *source* package 'markdown' ...
** package 'markdown' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc  -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG     -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c Rbase64.c -o Rbase64.o
sh: line 1: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:253: Rbase64.o] Error 127
ERROR: compilation failed for package 'markdown'
* removing 'C:/Users/james.tseng/AppData/Local/R/win-library/4.2/markdown'
Warning in install.packages :
  installation of package ‘markdown’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\james.tseng\AppData\Local\Temp\Rtmp0i55cD\downloaded_packages’

session_info()

> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.utf8  LC_CTYPE=English_Australia.utf8   
[3] LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.2.1 tools_4.2.1