Issues with R Studio?

702 views
Skip to first unread message

Alexandra McInturf

unread,
Jul 3, 2017, 5:39:55 PM7/3/17
to davi...@googlegroups.com
Hello all! 

Is anyone else having issues installing packages (specifically ggmap, OpenStreetMap, rJava and rgdal) in R Studio? 

Every time I try to load library(OpenStreetMap), I get this:

ERROR: configuration failed for package ‘rgdal’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status

OR

Error: package or namespace load failed for ‘OpenStreetMap’:
 .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


I realized that a lot of the issues I’m having in my analysis are coming from the fact that these packages are no longer working with my R Studio, although they used to work based on my former code…Do I need to install a different version of R? 

Alex

Alexandra McInturf
PhD Student, Animal Behavior
Biotelemetry Laboratory
University of California, Davis
amci...@ucdavis.edu  
agmci...@gmail.com



Alexandra McInturf

unread,
Jul 3, 2017, 6:51:03 PM7/3/17
to Tyson Howell, davi...@googlegroups.com
Thank you! Problem solved.

Alex

Alexandra McInturf
PhD Student, Animal Behavior
Biotelemetry Laboratory
University of California, Davis
amci...@ucdavis.edu  
agmci...@gmail.com



On Jul 3, 2017, at 3:23 PM, Tyson Howell <trho...@ucdavis.edu> wrote:

If you are running this on a campus managed computer the IT for your department may have removed java from your computer, they took it off all of the workstations in Plant Sciences in June. If you can load these packages on a personal machine/ something not managed by the University this may be the problem, you can talk to your IT people to get Java back on your machine.

Best,
Tyson


--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.


Alexandra McInturf

unread,
Jul 10, 2017, 5:28:37 PM7/10/17
to davi...@googlegroups.com
Hello again -

Turns out problem was not solved! I sent this last week, and have since tried installing and re-installing Java and R, both in the terminal and through the Java website. I’m working on a personal computer, but I’m still having the second issue when I try to install OpenStreetMap, as well as rJava:

Error: package or namespace load failed for ‘OpenStreetMap’:
 .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


Any suggestions would be appreciated! 

Alex

Alexandra McInturf
PhD Student, Animal Behavior
Biotelemetry Laboratory
University of California, Davis
amci...@ucdavis.edu  
agmci...@gmail.com



--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.

Brandon Hurr

unread,
Jul 10, 2017, 6:25:42 PM7/10/17
to davi...@googlegroups.com
Alex, 

I remember someone having a similar issue on the r-sig-mac-help list. That thread is here:

Look through that and see if anything helps. I think Simon Urbanek's advice and making sure you have the command line tools installed are the key, but it's hard to say. 

B

To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.

Alexandra McInturf

unread,
Jul 10, 2017, 6:35:00 PM7/10/17
to davi...@googlegroups.com
Hello Brandon -

Thanks for that. I did go through the terminal and did the following: 

test$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 1.6.0_65
Java home path   : /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
System Java on macOS

This worked, so then did the following:

tests-MacBook-Pro:~ test$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates.

Unfortunately, then I tried to install and re-install rJava and OpenStreetMap, which both seemed to work, but when I call up the OSM using the library() command, it has the same error. 

Alexandra McInturf
PhD Student, Animal Behavior
Biotelemetry Laboratory
University of California, Davis
amci...@ucdavis.edu  
agmci...@gmail.com



To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.

Brandon Hurr

unread,
Jul 10, 2017, 7:52:26 PM7/10/17
to davi...@googlegroups.com
Simon said that the newest binary uses a much newer version of java.
"Apple has dropped Java support many years ago - what you have a is a left-over from a very old OS X version as you likely upgraded your OS X over the years without re-installing.
Since R 3.4.0 the CRAN binary uses Java 1.8, because too many users have complained about incompatibilities with old Java version, so you have two options
1) recompile rJava from sources against your ancient Java
2) install Java 1.8 from Oracle[1], then run R CMD javareconf"

Try a new java and then try javareconf again?

B


To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.
Visit this group at https://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.
Visit this group at https://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.
Visit this group at https://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.

Alexandra McInturf

unread,
Jul 10, 2017, 11:09:16 PM7/10/17
to davi...@googlegroups.com
Hello all -

Thanks for the feedback. I’ve been trying Brandon’s solutions (they seem on point with what I’m seeing on the web), but still doesn’t work. I reinstalled Java, and now have Java 1.8 (according to my terminal), so that changed. Then I reconfigured, but still seeing the same error….Maybe time to try a new solution (such as the mapview package)?

Alexandra McInturf
PhD Student, Animal Behavior
Biotelemetry Laboratory
University of California, Davis
amci...@ucdavis.edu  
agmci...@gmail.com



Alex Mandel

unread,
Jul 11, 2017, 11:50:48 AM7/11/17
to davi...@googlegroups.com, Alexandra McInturf
It sounds like you might need to install the package from source
anyways. See example
https://github.com/snowflakedb/dplyr-snowflakedb/wiki/Configuring-R-rJava-RJDBC-on-Mac-OS-X

Is you error message still the same as before? Your rgdal error message
is something different (which we can resolve). Can you verify that you
have said file
'/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':

Also reminder, I suggested you switch to the ggmap package, or
shiny+leaflet previously.

Alex Mandel, PhD

Center for Spatial Sciences
http://spatial.ucdavis.edu
Geospatial and Farming Systems Research Consortium
http://gfc.ucdavis.edu
University of California, Davis


On 07/10/2017 08:09 PM, Alexandra McInturf wrote:
> Hello all -
>
> Thanks for the feedback. I’ve been trying Brandon’s solutions (they seem on point with what I’m seeing on the web), but still doesn’t work. I reinstalled Java, and now have Java 1.8 (according to my terminal), so that changed. Then I reconfigured, but still seeing the same error….Maybe time to try a new solution (such as the mapview package)?
>
> Alexandra McInturf
> PhD Student, Animal Behavior
> Biotelemetry Laboratory
> University of California, Davis
> amci...@ucdavis.edu <mailto:amci...@ucdavis.edu>
> agmci...@gmail.com <mailto:agmci...@gmail.com>
>> amci...@ucdavis.edu <mailto:amci...@ucdavis.edu>
>> agmci...@gmail.com <mailto:agmci...@gmail.com>
>>
>>
>>
>>> On Jul 10, 2017, at 3:25 PM, Brandon Hurr <brando...@gmail.com <mailto:brando...@gmail.com>> wrote:
>>>
>>> Alex,
>>>
>>> I remember someone having a similar issue on the r-sig-mac-help list. That thread is here:
>>> https://stat.ethz.ch/pipermail/r-sig-mac/2017-May/012402.html <https://stat.ethz.ch/pipermail/r-sig-mac/2017-May/012402.html>
>>>
>>> Look through that and see if anything helps. I think Simon Urbanek's advice and making sure you have the command line tools installed are the key, but it's hard to say.
>>>
>>> B
>>>
>>> On Mon, Jul 10, 2017 at 2:28 PM, Alexandra McInturf <agmci...@gmail.com <mailto:agmci...@gmail.com>> wrote:
>>> Hello again -
>>>
>>> Turns out problem was not solved! I sent this last week, and have since tried installing and re-installing Java and R, both in the terminal and through the Java website. I’m working on a personal computer, but I’m still having the second issue when I try to install OpenStreetMap, as well as rJava:
>>>
>>> Error: package or namespace load failed for ‘OpenStreetMap’:
>>> .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
>>>
>>>
>>> Any suggestions would be appreciated!
>>>
>>> Alex
>>>
>>> Alexandra McInturf
>>> PhD Student, Animal Behavior
>>> Biotelemetry Laboratory
>>> University of California, Davis
>>> amci...@ucdavis.edu <mailto:amci...@ucdavis.edu>
>>> agmci...@gmail.com <mailto:agmci...@gmail.com>
>>>
>>>
>>>
>>>> On Jul 3, 2017, at 2:39 PM, Alexandra McInturf <agmci...@gmail.com <mailto:agmci...@gmail.com>> wrote:
>>>>
>>>> Hello all!
>>>>
>>>> Is anyone else having issues installing packages (specifically ggmap, OpenStreetMap, rJava and rgdal) in R Studio?
>>>>
>>>> Every time I try to load library(OpenStreetMap), I get this:
>>>>
>>>> ERROR: configuration failed for package ‘rgdal’
>>>> * removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal’
>>>> Warning in install.packages :
>>>> installation of package ‘rgdal’ had non-zero exit status
>>>>
>>>> OR
>>>>
>>>> Error: package or namespace load failed for ‘OpenStreetMap’:
>>>> .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
>>>>
>>>>
>>>> I realized that a lot of the issues I’m having in my analysis are coming from the fact that these packages are no longer working with my R Studio, although they used to work based on my former code…Do I need to install a different version of R?
>>>>
>>>> Alex
>>>>
>>>> Alexandra McInturf
>>>> PhD Student, Animal Behavior
>>>> Biotelemetry Laboratory
>>>> University of California, Davis
>>>> amci...@ucdavis.edu <mailto:amci...@ucdavis.edu>
>>>> agmci...@gmail.com <mailto:agmci...@gmail.com>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Check out our R resources at http://d-rug.github.io/ <http://d-rug.github.io/>
>>>> ---
>>>> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com <mailto:davis-rug+...@googlegroups.com>.
>>>> Visit this group at https://groups.google.com/group/davis-rug <https://groups.google.com/group/davis-rug>.
>>>> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>>>
>>>
>>> --
>>> Check out our R resources at http://d-rug.github.io/ <http://d-rug.github.io/>
>>> ---
>>> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com <mailto:davis-rug+...@googlegroups.com>.
>>> Visit this group at https://groups.google.com/group/davis-rug <https://groups.google.com/group/davis-rug>.
>>> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>>>
>>>
>>> --
>>> Check out our R resources at http://d-rug.github.io/ <http://d-rug.github.io/>
>>> ---
>>> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com <mailto:davis-rug+...@googlegroups.com>.
>>> Visit this group at https://groups.google.com/group/davis-rug <https://groups.google.com/group/davis-rug>.
>>> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>>
>>
>> --
>> Check out our R resources at http://d-rug.github.io/ <http://d-rug.github.io/>
>> ---
>> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com <mailto:davis-rug+...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/davis-rug <https://groups.google.com/group/davis-rug>.
>> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>>
>> --
>> Check out our R resources at http://d-rug.github.io/ <http://d-rug.github.io/>
>> ---
>> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com <mailto:davis-rug+...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/davis-rug <https://groups.google.com/group/davis-rug>.
>> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
Reply all
Reply to author
Forward
0 new messages