Problem loading packages in R 3.6.1

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem loading packages in R 3.6.1

Tom Knox
I have recently installed R 3.6.1 on my MacBook running Mac OS Mojave 10.14.5 in order to run a custom package called MH1823 (probability of detection).  This package requires me to load the following packages from CRAN, tcltk, tcltk2, survival and xlsx.

I have installed survival, xlsx and tlctk2 (i believe tcltk is embedded).  When I look at Package Manager i see that although the above packages are installed they are not loaded.  I can load survival but when I try to load “xlsx” i get the following  error message is:

Error: package or namespace load failed for ‘xlsx’:
 .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
starting httpd help server … done


there may be a couple of hints in here.

 .onLoad failed in loadNamespace() for 'rJava', details  suggests the problem starts with calling rJava.

the next line in the error:
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
I have checked this path and see no problems, everything seems to stack up and I find jJava.so where it is supposed to be.  However in the next line:
 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
I don’t know what the number , 6 after Java.so means but have presumed version number and may be why Java8 is not working.  I also note the path …. /JavaVirtualMachines/jdk-11.0.1.jdk/ appears as . /JavaVirtualMachines/1.6.0.jdk/
suggesting a different build

the same occurs when I try to load the local source package MH1823

When I try to load HM1823 I get the error message:
* installing *source* package ‘mh1823’ ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error: package or namespace load failed for ‘xlsx’:
 .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
Error: package ‘xlsx’ could not be loaded
Execution halted
ERROR: lazy loading failed for package ‘mh1823’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/mh1823’
>

I find that the error message is substantially the same suggesting rJava and/or the version of Java.  I have tried removing Java 8 from my machine and installing Java 6 but don’t see any difference.  It is easy to see that Java 8 has been removed but not easy to see that 6 is installed properly as the path names are still the same.

When I try to load either tcltk or tcltk2, my instance of R stops responding entirely.

I have also installed Xquartz as I believe this is needed for Mac OS X

Can anyone provide some advice on what the issue might be?  I have tried reading through the FAQ’s but not found anything to point me in the right direction.

Regards,

Tom Knox
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading packages in R 3.6.1

Jeff Newmiller
Since no answer has been forthcoming, my advice is to read the Posting Guide. There is a more appropriate list for your question, and you should take the warning about posting using plain text format on all r-project mailing lists seriously.

On September 17, 2019 9:55:31 AM PDT, Thomas Knox <[hidden email]> wrote:

>I have recently installed R 3.6.1 on my MacBook running Mac OS Mojave
>10.14.5 in order to run a custom package called MH1823 (probability of
>detection).  This package requires me to load the following packages
>from CRAN, tcltk, tcltk2, survival and xlsx.
>
>I have installed survival, xlsx and tlctk2 (i believe tcltk is
>embedded).  When I look at Package Manager i see that although the
>above packages are installed they are not loaded.  I can load survival
>but when I try to load “xlsx” i get the following  error message is:
>
>Error: package or namespace load failed for ‘xlsx’:
> .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
>starting httpd help server … done
>
>
>there may be a couple of hints in here.
>
>.onLoad failed in loadNamespace() for 'rJava', details  suggests the
>problem starts with calling rJava.
>
>the next line in the error:
>error: unable to load shared object
>'/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
>I have checked this path and see no problems, everything seems to stack
>up and I find jJava.so where it is supposed to be.  However in the next
>line:
>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
>I don’t know what the number , 6 after Java.so means but have presumed
>version number and may be why Java8 is not working.  I also note the
>path …. /JavaVirtualMachines/jdk-11.0.1.jdk/ appears as .
>/JavaVirtualMachines/1.6.0.jdk/
>suggesting a different build
>
>the same occurs when I try to load the local source package MH1823
>
>When I try to load HM1823 I get the error message:
>* installing *source* package ‘mh1823’ ...
>** using staged installation
>** R
>** data
>** inst
>** byte-compile and prepare package for lazy loading
>Error: package or namespace load failed for ‘xlsx’:
> .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
>Error: package ‘xlsx’ could not be loaded
>Execution halted
>ERROR: lazy loading failed for package ‘mh1823’
>* removing
>‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/mh1823’
>>
>
>I find that the error message is substantially the same suggesting
>rJava and/or the version of Java.  I have tried removing Java 8 from my
>machine and installing Java 6 but don’t see any difference.  It is easy
>to see that Java 8 has been removed but not easy to see that 6 is
>installed properly as the path names are still the same.
>
>When I try to load either tcltk or tcltk2, my instance of R stops
>responding entirely.
>
>I have also installed Xquartz as I believe this is needed for Mac OS X
>
>Can anyone provide some advice on what the issue might be?  I have
>tried reading through the FAQ’s but not found anything to point me in
>the right direction.
>
>Regards,
>
>Tom Knox
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading packages in R 3.6.1

David Winsemius

On 9/19/19 1:11 AM, Jeff Newmiller wrote:
> Since no answer has been forthcoming, my advice is to read the Posting Guide. There is a more appropriate list for your question, and you should take the warning about posting using plain text format on all r-project mailing lists seriously.
>
> On September 17, 2019 9:55:31 AM PDT, Thomas Knox <[hidden email]> wrote:
>> I have recently installed R 3.6.1 on my MacBook running Mac OS Mojave
>> 10.14.5 in order to run a custom package called MH1823 (probability of
>> detection).  This package requires me to load the following packages
> >from CRAN, tcltk, tcltk2, survival and xlsx.

Which down below we see requires that the java development kit be
installed correctly for xlsx. This has been a recurrent issue on the Mac
and there are many question about it on the correct mailing list, which
is not rhelp, but rather R-SIG-mac.


Here's a link to the MarkLogic archive of r-sig-mac


https://markmail.org/search/?q=+list%3Aorg.r-project.r-sig-mac+install+java#query:list%3Aorg.r-project.r-sig-mac%20install%20java%20order%3Adate-backward+page:1+state:facets


... and if you don't want to use it then try rseek.org with a search
strategy of "install java mac". If that doesn't satisfy, then subscribe
and post a question on r-sig-mac with a full description of  results of
trying to install a newer version of java. I have version 10.0.1 on my
Mojave laptop.


--

David.

>> I have installed survival, xlsx and tlctk2 (i believe tcltk is
>> embedded).  When I look at Package Manager i see that although the
>> above packages are installed they are not loaded.  I can load survival
>> but when I try to load “xlsx” i get the following  error message is:
>>
>> Error: package or namespace load failed for ‘xlsx’:
>> .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
>> starting httpd help server … done
>>
>>
>> there may be a couple of hints in here.
>>
>> .onLoad failed in loadNamespace() for 'rJava', details  suggests the
>> problem starts with calling rJava.
>>
>> the next line in the error:
>> error: unable to load shared object
>> '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
>> I have checked this path and see no problems, everything seems to stack
>> up and I find jJava.so where it is supposed to be.  However in the next
>> line:
>> 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
>> I don’t know what the number , 6 after Java.so means but have presumed
>> version number and may be why Java8 is not working.  I also note the
>> path …. /JavaVirtualMachines/jdk-11.0.1.jdk/ appears as .
>> /JavaVirtualMachines/1.6.0.jdk/
>> suggesting a different build
>>
>> the same occurs when I try to load the local source package MH1823
>>
>> When I try to load HM1823 I get the error message:
>> * installing *source* package ‘mh1823’ ...
>> ** using staged installation
>> ** R
>> ** data
>> ** inst
>> ** byte-compile and prepare package for lazy loading
>> Error: package or namespace load failed for ‘xlsx’:
>> .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
>> Error: package ‘xlsx’ could not be loaded
>> Execution halted
>> ERROR: lazy loading failed for package ‘mh1823’
>> * removing
>> ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/mh1823’
>> I find that the error message is substantially the same suggesting
>> rJava and/or the version of Java.  I have tried removing Java 8 from my
>> machine and installing Java 6 but don’t see any difference.  It is easy
>> to see that Java 8 has been removed but not easy to see that 6 is
>> installed properly as the path names are still the same.
>>
>> When I try to load either tcltk or tcltk2, my instance of R stops
>> responding entirely.
>>
>> I have also installed Xquartz as I believe this is needed for Mac OS X
>>
>> Can anyone provide some advice on what the issue might be?  I have
>> tried reading through the FAQ’s but not found anything to point me in
>> the right direction.
>>
>> Regards,
>>
>> Tom Knox
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.