Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difficulty loading maxent package in R

Tags:

r

I'm trying to load up the maxent package in R (http://cran.r-project.org/web/packages/maxent/index.html) but it keeps returning the error:

Error: package ‘maxent’ is not installed for 'arch=x86_64'

The above is what happens when attempting just to load it from the CRAN repository. Specifically, when trying to build from the source, it goes:

> install.packages('maxent_1.3.3.tar.gz', repos = NULL, type = 'source')
Warning in install.packages :
  package ‘maxent_1.3.3.tar.gz’ is not available (for R version 2.15.2)
    Installing package(s) into     ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘maxent’ ...
** package ‘maxent’ successfully unpacked and MD5 sums checked
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘maxent’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/maxent’
* restoring previous     ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/maxent’

I've tried building the library from the source, as well as using the Mac OSX binary. Below is the information regarding my version:

platform       x86_64-apple-darwin9.8.0     
arch           x86_64                       
os             darwin9.8.0                  
system         x86_64, darwin9.8.0          
status                                      
major          2                            
minor          15.2                         
year           2012                         
month          10                           
day            26                           
svn rev        61015                        
language       R                            
version.string R version 2.15.2 (2012-10-26)
nickname       Trick or Treat

I'm doing all this in RStudio (Version 0.97.312). Has anyone else experienced this problem? Going into terminal to try to build the library hasn't worked, either.

like image 481
GHH Avatar asked May 16 '26 08:05

GHH


1 Answers

The error message

 sh: make: command not found

suggests that you don't have the command-line version of the XCode tools installed. Or maybe you do, but only for x64 in which case you should tell R CMD INSTALL (on the command-line) to not install for both architectures.

like image 100
Dirk Eddelbuettel Avatar answered May 18 '26 20:05

Dirk Eddelbuettel