installing dplyr on VM

390 views
Skip to first unread message

ArjunaCap

unread,
Apr 8, 2016, 11:32:53 AM4/8/16
to manipulatr
I'm attempting to configure a virtual machine running CentOS Linux 7.1.1503 and would like to use dplyr with an R installation on the VM

I've successfully installed R 3.2.3, and have managed to install a number of packages, some via the familiar install.packages() and others via yum install <package>, as documented at https://cran.r-project.org/bin/linux/redhat/README

However, from within R using install.packages(), installation of dplyr fails with the following error:

Selection: 25

trying URL 'https://mirrors.nics.utk.edu/cran/src/contrib/dplyr_0.4.3.tar.gz'

Content type 'application/x-gzip' length 655997 bytes (640 KB)

==================================================

downloaded 640 KB


* installing *source* package ‘dplyr’ ...

** package ‘dplyr’ successfully unpacked and MD5 sums checked

** libs

g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include -DCOMPILING_DPLYR -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/BH/include"   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c RcppExports.cpp -o RcppExports.o

In file included from RcppExports.cpp:4:0:

../inst/include/dplyr.h:4:18: fatal error: Rcpp.h: No such file or directory

 #include <Rcpp.h>

                  ^

compilation terminated.

make: *** [RcppExports.o] Error 1

ERROR: compilation failed for package ‘dplyr’

* removing ‘/usr/lib64/R/library/dplyr’


The downloaded source packages are in

‘/tmp/Rtmp3Qd0uZ/downloaded_packages’

Updating HTML index of packages in '.Library'

Making 'packages.html' ... done

Warning message:

In install.packages("dplyr") :

  installation of package ‘dplyr’ had non-zero exit status


The error seems to fault a missing header file "Rcpp.h"


if I run installed.packages(), there are of course MANY, but for Rcpp is says:

             Package        LibPath                Version       Priority  

Rcpp         "Rcpp"         "/usr/lib64/R/library" "0.12.3"      NA  


So, Rcpp would appear to be present.  Note that Rcpp was installed via yum install R-Rcpp.


Is there something obvious I'm missing?  I'm quite new to Linux.


Any assistance would be greatly appreciated.

ArjunaCap

unread,
Apr 13, 2016, 6:39:20 PM4/13/16
to manipulatr
A minor update on this.  I uninstalled Rcpp and Rcpp-devel ("yum remove R-Rcpp" etc) and re-installed them both.

the Rcpp.h file is now in the right place- the previous error output from install.packages()  told me right where to look for it ( -I"/usr/lib64/R/library/Rcpp/include" ).

however, when I now try to install dplyr, I get this message, which seems to blame something called cc1plus under g++:

* installing *source* package ‘dplyr’ ...
** package ‘dplyr’ successfully unpacked and MD5 sums checked
** libs
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include -DCOMPILING_DPLYR -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/BH/include"   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c RcppExports.cpp -o RcppExports.o

g++: internal compiler error: Killed (program cc1plus)

Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [RcppExports.o] Error 4

ERROR: compilation failed for package ‘dplyr’
* removing ‘/usr/lib64/R/library/dplyr’

The downloaded source packages are in
    ‘/tmp/RtmpfmMXnJ/downloaded_packages’

Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("dplyr") :
  installation of package ‘dplyr’ had non-zero exit status

ArjunaCap

unread,
Apr 14, 2016, 2:00:14 PM4/14/16
to manipulatr
Alright.  For completeness, here was the problem: too little memory on the 512mb RAM VM.

The solution was to set up a swap partition.  Below is the sequence of commands.

# view memory used/ available
$ free   

# create the swapfile and attrs
$ dd if=/dev/zero of=/var/swap.img bs=1024k count=1000

# designate file as swap partition area
$ mkswap /var/swap.img

# initiate swapping to the new file
$ swapon /var/swap.img

# verify that the swap space got created
$ free

God bless the internet.

On Friday, April 8, 2016 at 10:32:53 AM UTC-5, ArjunaCap wrote:
Reply all
Reply to author
Forward
0 new messages