RESOLVED!!
See my solution below, in case this question helps others in the future.
Error
As the title described, it it failing for me. The error I'm receiving, when I attempt to install.packages('rJava')
from inside R is (with some preceding good checks):
checking whether JNI programs can be compiled... yes
checking JNI data types... configure: error: One or more JNI types differ from the corresponding native type. You may need to use non-standard compiler flags or a different compiler in order to fix this.
ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/local/lib/R/3.2/site-library/rJava’
Fix Attempts
I have checked and tried the following resolutions, none of which worked for me:
sudo R CMD javareconf
more detailed sudo R CMD javareconf
export JAVA_HOME
, however in this case, I did not do the LD_LIBRARY_PATH, as it did not seem relevant to a Mac.
No such luck, with any of these attempts.
I had previously had rJava
(and RJDBC
) installed properly.
[Edit: I later found out, the actual problem was upgrading to OS X 10.11, El Capitan.]
Configuration
$ java -version
java version "1.8.0_45"
> R.Version()
$platform
[1] "x86_64-apple-darwin15.0.0"
$version.string
[1] "R version 3.2.2 (2015-08-14)"
Mac OS itself:
System Version: OS X 10.11.1 (15B42)