Hi,
I'm trying to install "qdap" package for text mining and there seems to be an error with its loading.
When I download the package, I get this message:
There are binary versions available but the source versions are later:
binary source needs_compilation
openNLP 0.2-6 0.2-7 FALSE
stringdist 0.9.5.3 0.9.5.5 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel)
Whether I choose yes or no, I get this message:
ERROR: lazy loading failed for package ‘openNLP’
removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/openNLP’
Warning in install.packages :
installation of package ‘openNLP’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/9l/31q8n1y90z5675pygx688m2c0000gn/T/RtmpQbNBA0/downloaded_packages’
None of the qdap function works and when I try to load the package, I get this:
Error: package or namespace load failed for ‘qdap’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘openNLP’
If anyone could help, I'd be grateful - I'm just starting with R and I've been stuck on that for quite a while.
> install.packages("openNLP")
There is a binary version available but the source version is later:
binary source needs_compilation
openNLP 0.2-6 0.2-7 FALSE
installing the source package ‘openNLP’
trying URL 'https://cran.rstudio.com/src/contrib/openNLP_0.2-7.tar.gz'
Content type 'application/x-gzip' length 7444 bytes
==================================================
downloaded 7444 bytes
* installing *source* package ‘openNLP’ ...
** package ‘openNLP’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Warning in system("/usr/libexec/java_home", intern = TRUE) :
running command '/usr/libexec/java_home' had status 1
Error: .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
Reason: image not found
Execution halted
ERROR: lazy loading failed for package ‘openNLP’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/openNLP’
Warning in install.packages :
installation of package ‘openNLP’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/9l/31q8n1y90z5675pygx688m2c0000gn/T/RtmpRJAWa6/downloaded_packages’
This is the key part, R is not being able to find a Java installation in your system. Do you have Java installed in your system? if so, it matches the R installation architecture (i.e. 32 or 64 bits)?