RJava installation not working- C compiler cannot create executables

install.packages('rJava', type='source')
trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-10.tar.gz'
Content type 'application/x-gzip' length 672577 bytes (656 KB)
==================================================
downloaded 656 KB

* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
checking for gcc... /usr/local/Cellar/gcc/8.2.0/bin/gcc-7
checking whether the C compiler works... no
configure: error: in `/private/var/folders/0l/h5hr8zts4fx11trh248dtwzr2f0p31/T/RtmpWiy9vc/R.INSTALLa5994b4fabc3/rJava':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘rJava’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava’
Warning in install.packages :
  installation of package ‘rJava’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/0l/h5hr8zts4fx11trh248dtwzr2f0p31/T/RtmpvEhIcw/downloaded_packages’

I'm getting this error, trying to install rJava but not being able on my MAC.

Thanks

Have you installed this libraries for compiling packages on MAC OS?

Important: this release uses Clang 6.0.0 and GNU Fortran 6.1, neither of which is supplied by Apple. If you wish to compile R packages from sources, you will need to download and install those tools - see the tools directory.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.