Closed oxonnsn closed 4 years ago
@PRijnbeek sent me this solution some time ago:
sudo ln -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
sudo R CMD javareconf
install.packages("rJava",type='source')
Peter, maybe you can elaborate?
Hi there, I'm new to R and the SCCS package - but have been having problems loading up the SCCS package. I'm running MacOS High Sierra and I've installed Java - checked on Terminal -
adminsmac$ java -version java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
- but when loading the SCCS package: "install.packages("devtools") library(devtools) install_github("ohdsi/OhdsiRTools") install_github("ohdsi/SqlRender") install_github("ohdsi/DatabaseConnector") install_github("ohdsi/Cyclops") install_github("ohdsi/SelfControlledCaseSeries")"
- I am getting the error messages: 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.4/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so Reason: image not found ERROR: lazy loading failed for package ‘SqlRender’
Do you have any advice? Many thanks!
Total script:
The downloaded binary packages are in /var/folders/w9/03_q4w_s2wg9sl82dl2j7yy40000gp/T//RtmpeTtEZr/downloaded_packages
installing source package ‘SqlRender’ ... Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'zone/tz/2017c.1.0/zoneinfo/Europe/London' R inst tests preparing 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.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so Reason: image not found ERROR: lazy loading failed for package ‘SqlRender’
removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/SqlRender’
restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/SqlRender’ Installation failed: Command failed (1)
installing source package ‘DatabaseConnector’ ... Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'zone/tz/2017c.1.0/zoneinfo/Europe/London' R inst tests preparing 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 ‘DatabaseConnector’: .onLoad failed in loadNamespace() for 'DatabaseConnector', details: call: NULL 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.4/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so Reason: image not found Error: loading failed Execution halted ERROR: loading failed
removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/DatabaseConnector’ Installation failed: Command failed (1)
ERROR: dependency ‘DatabaseConnector’ is not available for package ‘SelfControlledCaseSeries’