renv::restore() gives Error: install of package 'dplyr' failed [error code 1]

Installing dplyr [0.8.5] ...
	FAILED
Error installing package 'dplyr':
=================================

* installing to library ‘/cloud/project/renv/staging/1’
* installing *source* package ‘dplyr’ ...
** package ‘dplyr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c address.cpp -o address.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c api.cpp -o api.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c arrange.cpp -o arrange.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c between.cpp -o between.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c bind.cpp -o bind.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c distinct.cpp -o distinct.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c encoding.cpp -o encoding.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c filter.cpp -o filter.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c group_indices.cpp -o group_indices.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c hybrid.cpp -o hybrid.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c init.cpp -o init.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c join.cpp -o join.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c join_exports.cpp -o join_exports.o
g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/cloud/project/renv/staging/1/BH/include" -I"/cloud/project/renv/staging/1/plogr/include" -I"/cloud/project/renv/staging/1/Rcpp/include" -I/usr/local/include  -fpic  -g -O2  -c mutate.cpp -o mutate.o
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [/opt/R/3.6.3/lib/R/etc/Makeconf:177: mutate.o] Error 1
ERROR: compilation failed for package ‘dplyr’
* removing ‘/cloud/project/renv/staging/1/dplyr’
Error: install of package 'dplyr' failed [error code 1]

The source set for dplyr in your lock file doesnt point to a binary installer but to a source file wich requires compilation and you are running out of RAM memory while compiling. Try changing the source for the package to a repository that provides binaries like RSPM

Hi I saw another post with a similar issue.

I tried this code

renv::restore(repos = "http://package-proxy")

but flying a bit blind here. Any help is apprecaited.

Ben