Error : .onLoad failed in loadNamespace() for 'RSPerl', details: - r

I have been trying to install the package RSPerl with the command where I have R 2.15.3 and Perl 5.10 :
PERL=`which perl` R --vanilla CMD INSTALL -c -l ~/library/ RSPerl_0.92-1.tar.gz
I am getting this error:
Warning: /tmp/RtmpQZ3PRs/R.INSTALL146277fe434b/RSPerl/man/PerlReferenceObjects.Rd:32: unknown macro '\textit'
*** installing help indices
** building package indices
Removing additional files
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'RSPerl', details:
call: setPerlLib(FALSE)
error: could not find function "Sys.putenv"
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/AVT2130/software/R-2.15.3/library/RSPerl
Please help to solve this problem.
Thank you,

Related

Error : package 'rJava' could not be loaded but library(rJava) is working

I've 64 bit machine and have installed jdk and jre(64 bit) also R and R studio is 64bit. I'm trying to install 'rMongodb' package by:
devtools::install_github("tc/RMongo")
but it gives out error
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/saini/OneDrive/Documents/R/win-library/3.5/rJava/libs/i386/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Error : package 'rJava' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
Warning: package 'rJava' was built under R version 3.5.2
ERROR: loading failed for 'i386'
* removing 'C:/Users/saini/OneDrive/Documents/R/win-library/3.5/RMongo'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/saini/AppData/Local/Temp/RtmpuEHfqO/file20f419985c01/RMongo_0.1.0.tar.gz’ had non-zero exit status
Even though library(rJava) works fine.
Ps. I've already set the environment variables.

Problem in installing 'RMongo' throws rJava error even though library(rJava) works fine

install.packages("RMongo")
doesn't works (seems like it has been deprecated.
So, I was trying to install using devtools.
devtools::install_github("tc/Rmongo")
but it gives out error
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/saini/OneDrive/Documents/R/win-library/3.5/rJava/libs/i386/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Error : package 'rJava' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
Warning: package 'rJava' was built under R version 3.5.2
ERROR: loading failed for 'i386'
* removing 'C:/Users/saini/OneDrive/Documents/R/win-library/3.5/RMongo'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/saini/AppData/Local/Temp/RtmpuEHfqO/file20f419985c01/RMongo_0.1.0.tar.gz’ had non-zero exit status
Even though library(rJava) works fine.
JDK, JRE are both 64 bit. R and R studio are also 64 bits.
Someone suggested to use
R CMD javareconf
but it doesnot recongnises javareconf.
Also, I've set Environment Variables.

Install R package - FSELCETOR on SUSElinux server

I have an account to Suse linux server, without root access.
I have installed an R , and now I want to use FSELECTOR package.
I have started with this steps:
$ whereis java
java: /usr/bin/java /usr/lib64/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz
$ R CMD javareconf -e
$unset JAVA_HOME
And then I have started R
Sys.setenv(JAVA_HOME='\\usr\\lib64\\java\\)
install.packages("FSelector")
During the installation process I have got this message:
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘RWekajars’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/RWekajars’
ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/RWeka’
ERROR: dependency ‘RWeka’ is not available for package ‘FSelector’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/FSelector’
Any Ideа?
I want to install rJava, but i have got the same result.
Sys.setenv(JAVA_HOME='\\usr\\lib64\\jvm\\java-10-openjdk-10')
install.packages("rJava")
Installing package into ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
......
4 warnings
make[1]: Leaving directory '/tmp/RtmpTkyyj5/R.INSTALLb60f4541cb34/rJava/jri'
installing via 'install.libs.R' to /home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava’
The downloaded source packages are in
‘/tmp/RtmpcwM6XO/downloaded_packages’
Warning message:
In install.packages("rJava") :
installation of package ‘rJava’ had non-zero exit status
To install FSelector you need this [debian]
sudo apt-get install -y r-cran-randomforest
sudo apt-get install -y default-jre
sudo apt-get install -y default-jdk
sudo R CMD javareconf

coreNLP & rJava installation issue from gitbub in R

fellow stackoverflowers!
I was trying to install coreNLP from github as there is a bug in the coreNLP package that comes with R.
Now while installing the coreNLP from github using below
To download the R library and corresponding CoreNLP java library, run the following in R:
devtools::install_github("statsmaths/coreNLP")
coreNLP::downloadCoreNLP()
I got an error
installing source package 'coreNLP' ...
** R
** data
* moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
* installing help indices
** building package indices
** testing if installed package can be loaded
* arch - i386
Error: package or namespace load failed for 'coreNLP':
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
Error: loading failed
Execution halted
* arch - x64
ERROR: loading failed for 'i386'
removing 'C:/Users/animshru/Documents/R/win-library/3.4/coreNLP'
Installation failed: Command failed (1)
After looking at many suggestions what I understood was
i) I was missing the class file path for Java Home and added the same and tried installing coreNLP again.
Sys.setenv(JAVA_HOME='C:/Program Files/Java/jre1.8.0_121')
devtools::install_github("statsmaths/coreNLP")
This time the error generated relates to the package/library rJava as seen below
Downloading GitHub repo statsmaths/coreNLP#master
from URL https://api.github.com/repos/statsmaths/coreNLP/zipball/master
Installing coreNLP
"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/XYZ/AppData/Local/Temp/RtmpieUxG6/devtools3c0456877ca/statsmaths-coreNLP-caee22e" \
--library="C:/Users/XYZ/Documents/R/win-library/3.4" --install-tests
installing source package 'coreNLP' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/XYZ/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: The specified module could not be found.
ERROR: lazy loading failed for package 'coreNLP'
* removing 'C:/Users/XYZ/Documents/R/win-library/3.4/coreNLP'
Installation failed: Command failed (1)
I have installed the rJava package successfully and able to access the library for the same. Now I need to understand why I am getting this error of access issue to a rjava.dll file inside the package rJava.?
Has anyone encountered the same problem already??
I have double and triple checked the java version is 64bit same as the R.
Any hints folks??
Thanks

not able to use rJava after installing the package successfully

I am not able to use rJava after installing the package successfully.
library("rJava") Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dirname(this$RuntimeLib) error: a character vector argument expected Error: package or namespace load failed for ‘rJava’

Resources