Some Mac users (including me) were able to fix this just by going to the console and typing "R CMD javareconf" and restarting R.
Windows users seemed to have much more significant issues, however. There seemed to be several issues, but here's a solution that helped several of the students, courtesy of Hirzi Luqman:
Error:
* installing *source* package ‘ENMTools’ ...
** R
** data
*** moving datasets to lazyload DB
** tests
** byte-compile and prepare package for lazy loading
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framewo
dlopen(/Library/Frameworks/R.f
Referenced from: /Library/Frameworks/R.framewor
Reason: image not found
ERROR: lazy loading failed for package ‘ENMTools’
* removing ‘/Library/Frameworks/R.framewo
Installation failed: Command failed (1)
Problem:
ENMtools/rJava was looking for (and couldn't find) the library "libjvm.dylib" in the directory "/Library/Java/JavaVirtualMach
Solution: I just copied the same file from the Java 8 directory (or whatever Java version is installed on the computer; in my case the directory was "/Library/Java/JavaVirtualMach
Update: GitHub user Sandy had a different issue, detailed here. The fix in that case was:
I removed all PATH related to "java", then Add jvm.dll to PATH (adding "%JAVA_HOME%\jre\bin\server;" to PATH).
After that, I set up the JAVA_HOME in R:
Sys.setenv(JAVA_HOME="C:\\Program Files\\Java\\jdk1.8.0_171\\")
.
Hello
ReplyDeleteI tried to install ENMTools package on windows 10, but got this error:
> install_github("danlwarren/ENMTools")
Downloading GitHub repo danlwarren/ENMTools@master
Error in read.dcf(path) :
Found continuation line starting ' person("Olivier", " ...' at begin of record.
Would you mind give me some suggestions?
Best regards,
Daryl
Hey there! This happens a lot. I think it's an issue with the DESCRIPTION file in ecospat. All you need to do is install ecospat first on its own (using install.packages("ecospat")), and then install ENMTools after that.
ReplyDeleteHi Dan,
DeleteI have been also facing some issues concerning ENMTools installation. I have updated R (v3.5.2) and Rstudio (v1.1.463) to the most recent versions. I was having the same error as reported above and I have installed the package "ecospat" as you recommended.
However, R is now printing a different error while installing ENMTools. After listing if I want to update some packages, the following print messages are displayed:
√ checking for file 'C:\Users\Andre\AppData\Local\Temp\RtmpovYBoN\remotes1ed4601d4e3e\danlwarren-ENMTools-e7c61ac/DESCRIPTION' ...
- preparing 'ENMTools':
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- looking to see if a 'data/datalist' file should be added
- building 'ENMTools_0.2.tar.gz'
Installing package into ‘C:/Users/Andre/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package 'ENMTools' ...
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error : object 'plotp' not found whilst loading namespace 'rms'
ERROR: lazy loading failed for package 'ENMTools'
* removing 'C:/Users/Andre/Documents/R/win-library/3.5/ENMTools'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/Andre/AppData/Local/Temp/RtmpovYBoN/file1ed4262c1f9f/ENMTools_0.2.tar.gz’ had non-zero exit status
It looks like there is some issue with the package "rms". I checked online and it is possible that this is an issue with older R versions. Please, check for example this post: https://github.com/vegandevs/vegan/issues/274
However, my R version and the rms package are updated to the most recent versions. Any ideas? Thank you for your help.
Best,
André
Try library(rms) and then type plotp and see what happens.
DeleteHello Dan,
ReplyDeleteI am getting the same error of installation ENMTools, and i've tried your recommendation but there is still an issue:
* installing *source* package 'ENMTools' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error: (converted from warning) package 'raster' was built under R version 3.6.2
Execution halted
ERROR: lazy loading failed for package 'ENMTools'
* removing 'C:/Users/layse/Documents/R/win-library/3.6/ENMTools'
Error: Failed to install 'ENMTools' from GitHub:
(converted from warning) installation of package ‘C:/Users/layse/AppData/Local/Temp/RtmpMBgsf8/file19482b8957a6/ENMTools_0.2.tar.gz’ had non-zero exit status
its seems that i am having a problem with raster package, but i don't quite understand how to fix it..
any ideias?
Thanks in advance for you help
What version of R are you running? It seems like the newest version of raster might not like your R version.
Delete