Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rjava dependent package installation Segmentation fault (core dumped)

I am trying to reinstall a package that I was previously able to install and use. I was building a package of my own after my computer unexpectedly restarted and then I started to have problems loading the rpgraph package. So I decided to uninstall it and to reinstall it. When I did so I got the following error:

library(devtools)

library(rJava)
install_github("Albluca/rpgraph")


Downloading GitHub repo Albluca/rpgraph@master
from URL https://api.github.com/repos/Albluca/rpgraph/zipball/master
Installing rpgraph
Running command /usr/lib/R/bin/R
Arguments:
CMD
INSTALL
/tmp/Rtmp5OrtLL/devtools505a703b3ccd/Albluca-rpgraph-de04f96
--library=/home/gonzalo/R/x86_64-pc-linux-gnu-library/3.4
--install-tests

installing source package ‘rpgraph’ ...
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Segmentation fault (core dumped)
ERROR: loading failed
removing ‘/home/gonzalo/R/x86_64-pc-linux-gnu-library/3.4/rpgraph’
Installation failed: run(bin, args = real_cmdargs,         stdout_line_callback = real_callback(stdout), stderr_line_callback =     real_callback(stderr), stdout_callback = real_block_callback,     stderr_callback = real_block_callback, echo_cmd = echo, echo = show,     spinner = spinner, error_on_status = fail_on_status, timeout = timeout) :     System command error`

I tried reinstalling JAva and cran from zero but somehow there is something that remains in my system that avoids the package to be installed. Also, since the error is not very informative, I have no idea on how to narrow where the problem is.

Thanks for any help you can provide.

like image 363
gonzalipto Avatar asked Jun 21 '17 17:06

gonzalipto


People also ask

Why am I getting segmentation fault core dumped?

Core Dump/Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you.” When a piece of code tries to do read and write operation in a read only location in memory or freed block of memory, it is known as core dump. It is an error indicating memory corruption.


1 Answers

I experienced the same problem while installing the libraries vanneuler and wordnet and solved the issue using the solution proposed by Kenneth. In my case the option -Xss2560k was enough to solve:

export _JAVA_OPTIONS="-Xss2560k"

In addition: instead of running the export command from the terminal the java option can be set directly from the R session with the following command:

options(java.parameters = "-Xss2560k")

like image 149
rlar Avatar answered Sep 24 '22 04:09

rlar