I was trying to install renv packages. Here're my steps I did:
-
Install renv package
install.packages( "https://cran.r-project.org/src/contrib/Archive/renv/renv_0.12.5.tar.gz", repos = NULL, type = "source" ) -
Initialize a local library
renv::init(bare=TRUE) -
Install the correct packages
renv::restore()
In the #3 process, I faced an error message as below;
Installing Matrix [1.2-18] ...
FAILED
Error installing package 'Matrix':
- installing to library 'C:/Users/gkim01/AppData/Local/Temp/RtmpqCrPev/renv-staging-4ef4325e15a3'
- installing source package 'Matrix' ...
** package 'Matrix' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -DNTIMER -I./SuiteSparse_config -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c CHMfactor.c -o CHMfactor.o
/bin/sh: line 1: gcc: command not found
make: *** [C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/etc/x64/Makeconf:253: CHMfactor.o] Error 127
ERROR: compilation failed for package 'Matrix' - removing 'C:/Users/gkim01/AppData/Local/Temp/RtmpqCrPev/renv-staging-4ef4325e15a3/Matrix'
Error: install of package 'Matrix' failed
Actually, I had different error because I didn't install RTools. After RTools installed, I got this error on the same page of 'Matrix' installation. Please help me solve this!!
Thanks.