在R中加载maxent包遇到困难

3
我正在尝试在 R 中加载 maxent 包 (http://cran.r-project.org/web/packages/maxent/index.html),但它一直返回错误:
Error: package ‘maxent’ is not installed for 'arch=x86_64'

以上是从CRAN存储库尝试加载时发生的情况。具体来说,在尝试从源代码构建时,会出现以下情况:

> 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’

我尝试过从源代码构建该库,也使用了Mac OSX二进制文件。以下是关于我的版本的信息:

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

我正在使用RStudio(版本0.97.312)进行所有操作。有其他人遇到过这个问题吗?尝试进入终端构建库也没有成功。


我担心如果你不向我们展示构建过程中的错误信息,我们将无法提供帮助。 - Dirk Eddelbuettel
查看更改,指出尝试不同方法时的不同错误。 - GHH
1个回答

3
错误信息
 sh: make: command not found

这提示说明您没有安装XCode工具的命令行版本。或者您可能已经安装了,但只是对于x64,在这种情况下,您应该告诉R CMD INSTALL(在命令行上)不要为两个架构安装。


已更新到当前版本的XCode(之前使用的是一个较旧的版本)并安装了命令行工具。运行得非常好,非常感谢! - GHH

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接