2

这个问题与安装 Rstem Package 中的问题有关,但我认为上一个中提供的答案不适用于我的情况。

我已经下载了源码包,安装不正常。欢迎任何帮助!

install.packages("~/Downloads/Rstem_0.4-1.tar.gz", repos = NULL, type = "source")

这是我得到的错误:

Warning in install.packages :
  package ‘~/Downloads/Rstem_0.4-1.tar.gz’ is not available (for R version 2.15.3)
Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’
Warning in install.packages :
  installation of package ‘/Users/mbtangotan/Downloads/Rstem_0.4-1.tar.gz’ had non-zero exit status

也试过:

install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")

得到这个作为输出:

trying URL 'http://www.omegahat.org/R/src/contrib/Rstem_0.4-1.tar.gz'
Content type 'application/x-gzip' length 274336 bytes (267 Kb)
opened URL
downloaded 267 Kb

* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’

The downloaded source packages are in
‘/private/var/folders/t3/f4r4rwmn7xl80skj6h35ftnh0000gn/T/RtmpWKxXs2/downloaded_packages’
Warning message:
In install.packages("Rstem", repos = "http://www.omegahat.org/R",  :
  installation of package ‘Rstem’ had non-zero exit status

R 版本:2.15.3,x86_64,OSX。

4

2 回答 2

3

如果make未找到,则表明您需要安装适合您未指定版本的“OSX”的 XCode。

如果您确实安装了 XCode,这应该会成功(至少它刚刚在我的 MacPro 运行 OSX 10.6.8、R 3.0.0 RC 和 XCode 3.2.6 (1761) 时做到了:

install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")

是否还有其他问题,我无法判断。该包裹已从 CRAN 中取出,因此沼泽中可能还有其他短吻鳄。

于 2013-05-04T01:38:37.220 回答
1

FWIW,我刚刚向 CRAN 上传了一个名为 SnowballC 的新包,它实现了与 Rstem 相同的功能并使用相同的算法。Mac OS X 和 Windows 的二进制包将在几小时/几天内提供。

http://cran.r-project.org/web/packages/SnowballC/

于 2013-05-23T10:35:34.777 回答