Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: compilation failed for package ‘Rcpp’

Tags:

r

rstudio

I am getting the following error when i try to install plyr package, I have tried some of the solutions suggested in other threads but they dont seem to be working. I have recently upgraded the version of R and R studio on the server

> install.packages("plyr")
Installing package into ‘/home/arsvis5/R/x86_64-redhat-linux-gnu-library/2.15’
(as ‘lib’ is unspecified)
also installing the dependency ‘Rcpp’

trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.11.2.tar.gz'
Content type 'application/x-gzip' length 2004313 bytes (1.9 Mb)
opened URL
==================================================
downloaded 1.9 Mb

trying URL 'http://cran.rstudio.com/src/contrib/plyr_1.8.1.tar.gz'
Content type 'application/x-gzip' length 393233 bytes (384 Kb)
opened URL
==================================================
downloaded 384 Kb

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c Date.cpp -o Date.o
../inst/include/Rcpp/Date.h: In member function ‘void Rcpp::Date::update_tm()’:
../inst/include/Rcpp/Date.h:108: warning: converting to ‘time_t’ from ‘double’
../inst/include/Rcpp/Date.h: In function ‘Rcpp::Date Rcpp::operator+(const Rcpp::Date&, int)’:
../inst/include/Rcpp/Date.h:139: warning: converting to ‘time_t’ from ‘double’
Date.cpp: In function ‘double Rcpp::mktime00(tm&)’:
Date.cpp:57: warning: converting to ‘int’ from ‘double’
Date.cpp:60: warning: converting to ‘int’ from ‘double’
Date.cpp: In function ‘tm* Rcpp::timesub(const time_t*, long int, const Rcpp::state*, tm*)’:
Date.cpp:1196: warning: converting to ‘long int’ from ‘double’
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c Module.cpp -o Module.o
../inst/include/Rcpp/Date.h: In member function ‘void Rcpp::Date::update_tm()’:
../inst/include/Rcpp/Date.h:108: warning: converting to ‘time_t’ from ‘double’
../inst/include/Rcpp/Date.h: In function ‘Rcpp::Date Rcpp::operator+(const Rcpp::Date&, int)’:
../inst/include/Rcpp/Date.h:139: warning: converting to ‘time_t’ from ‘double’
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c Rcpp_init.cpp -o Rcpp_init.o
../inst/include/Rcpp/Date.h: In member function ‘void Rcpp::Date::update_tm()’:
../inst/include/Rcpp/Date.h:108: warning: converting to ‘time_t’ from ‘double’
../inst/include/Rcpp/Date.h: In function ‘Rcpp::Date Rcpp::operator+(const Rcpp::Date&, int)’:
../inst/include/Rcpp/Date.h:139: warning: converting to ‘time_t’ from ‘double’
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c api.cpp -o api.o
../inst/include/Rcpp/Date.h: In member function ‘void Rcpp::Date::update_tm()’:
../inst/include/Rcpp/Date.h:108: warning: converting to ‘time_t’ from ‘double’
../inst/include/Rcpp/Date.h: In function ‘Rcpp::Date Rcpp::operator+(const Rcpp::Date&, int)’:
../inst/include/Rcpp/Date.h:139: warning: converting to ‘time_t’ from ‘double’
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c attributes.cpp -o attributes.o
../inst/include/Rcpp/Date.h: In member function ‘void Rcpp::Date::update_tm()’:
../inst/include/Rcpp/Date.h:108: warning: converting to ‘time_t’ from ‘double’
../inst/include/Rcpp/Date.h: In function ‘Rcpp::Date Rcpp::operator+(const Rcpp::Date&, int)’:
../inst/include/Rcpp/Date.h:139: warning: converting to ‘time_t’ from ‘double’
{standard input}: Assembler messages:
{standard input}:87953: Warning: end of file not at end of a line; newline inserted
{standard input}:89432: Error: undefined symbol `.LLSDATT10675' in operation
{standard input}:89435: Error: undefined symbol `.LLSDACSE10675' in operation
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [attributes.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/home/arsvis5/R/x86_64-redhat-linux-gnu-library/2.15/Rcpp’
Warning in install.packages :
  installation of package ‘Rcpp’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘plyr’
* removing ‘/home/arsvis5/R/x86_64-redhat-linux-gnu-library/2.15/plyr’
Warning in install.packages :
  installation of package ‘plyr’ had non-zero exit status


> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] codetools_0.2-9 RMySQL_0.9-3    DBI_0.3.0      

loaded via a namespace (and not attached):
[1] tools_3.1.0
like image 276
user3641528 Avatar asked Sep 03 '14 16:09

user3641528


2 Answers

The issue was resolved after upgrading RAM on my server, the package was not installing because there was not enough memory available on the server.

like image 133
user3641528 Avatar answered Sep 18 '22 01:09

user3641528


I resolved the issue by installing r-base-dev package on Ubuntu, by running the command below:

sudo apt install r-base-dev

like image 29
Erick Avatar answered Sep 19 '22 01:09

Erick