Question

I am not familiar with Mac (I use Windows and Linux Mint) but have a package that I need to be able to tell people on all platforms how to build. This package relies on openNLP and because of encoding issues with the MacOS X does not install via install.packages("openNLP").

I have had people tell me you can still install using install.packages("openNLP", type="source") but I get the following message:

> install.packages("openNLP", type="source")
trying URL 'http://cran.rstudio.com/src/contrib/openNLP_0.0-8.tar.gz'
Content type 'application/x-gzip' length 807784 bytes (788 Kb)
opened URL
==================================================
downloaded 788 Kb

* installing *source* package ‘openNLP’ ...
/Library/Frameworks/R.framework/Resources/bin/config: line 142: make:
command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 219: make:
command not found
Could not determine the Java interpreter.
Maybe run R CMD javareconf?
ERROR: configuration failed for package ‘openNLP’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/openNLP’

The downloaded source packages are in
        ‘/private/var/folders/YW/YWal638NEwi-tFse3NsBFk+++TM/-Tmp-/RtmpaWdKnC/downloaded_packages’
Warning message:
In install.packages("openNLP", type = "source") :
  installation of package ‘openNLP’ had non-zero exit status

So I use Mac''s temrinal to do the suggested R CMD javareconf:

Java interpreter : /usr/bin/java
Java version     : 1.6.0_37
Java home path   :
/System/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
Java library path:
JNI linker flags : -framework JavaVM
JNI cpp flags    : -I$(JAVA_HOME)/include

Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

And try closing out R, re-opening and then install.packages("openNLP", type="source") but the same message occurs. Google has not helped me here and I am very unfamiliar with Mac. I assume it has to do with the type of java installed but know too little about Mac to play aimlessly as this is not my Mac machine.

Please direct me with getting openNLP to install correctly.

Was it helpful?

Solution

I just compiled from source on Mas OSX 10.6.8 with R 2.15.2 with no error. Given the fact that the error message says make cannot be found, it sounds as though that machine is not yet set up to compile from source. Do you understand that XCode is not installed by default and that you need to acquire it from Apple in order to compile "source" packages?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top