0

I'm trying to install text2vec on an AWS EC2 Free-tier Ubuntu VM. I get this error message:

> install.packages(c("text2vec"), type = "source")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/text2vec_0.5.1.tar.gz'
Content type 'application/x-gzip' length 3486448 bytes (3.3 MB)
==================================================
downloaded 3.3 MB

* installing *source* package ‘text2vec’ ...
** package ‘text2vec’ successfully unpacked and MD5 sums checked
** libs
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppParallel/include" -I"/usr/local/lib/R/site-library/digest/include" -I"/usr/local/lib/R/site-library/sparsepp/include"    -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c GloveFitter.cpp -o GloveFitter.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
/usr/lib/R/etc/Makeconf:168: recipe for target 'GloveFitter.o' failed
make: *** [GloveFitter.o] Error 4
ERROR: compilation failed for package ‘text2vec’
* removing ‘/usr/local/lib/R/site-library/text2vec’

The downloaded source packages are in
    ‘/tmp/RtmpJU4eqr/downloaded_packages’
Warning message:
In install.packages(c("text2vec"), type = "source") :
  installation of package ‘text2vec’ had non-zero exit status

Does this have to do with the limitations of my VM's RAM? How can I install the package anyway to get around this error? Prerequisite is that I can't drop a dime.

Christopher Costello
  • 1,186
  • 2
  • 16
  • 30

2 Answers2

1

It can be the case for machines with 1 gb RAM, I didn't test. However you can try to install binary version - read here https://cran.r-project.org/bin/linux/ubuntu/README.html for example (Ubuntu).

Dmitriy Selivanov
  • 4,545
  • 1
  • 22
  • 38
0

Found the solution. I was using the wrong repository for my version of Ubuntu. I was using Trusy when I should have been using Xenial.

Christopher Costello
  • 1,186
  • 2
  • 16
  • 30