R: compilation failed for package 'slam'

为君一笑 提交于 2019-12-12 04:29:35

问题


I am using R 2.15.2 and I want to install the tm package to do some text analysis. I have downloaded the compatible tm package from the CRAN archives. I downloaded tm_0.5-9

I tried to install it using

install.packages("/Downloads/tm_0.5-9.tar.gz", repos = NULL, type="source", dependencies = TRUE)

and got the following error

Installing package(s) into ‘/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
ERROR: dependency 'slam' is not available for package 'tm'
* removing '/Documents/R/win-library/2.15/tm'
Warning in install.packages :
  running command 'C:/PROGRA~1/R/R-215~1.2/bin/x64/R CMD INSTALL -l "/Documents/R/win-library/2.15"   "/Downloads/tm_0.5-9.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘/Downloads/tm_0.5-9.tar.gz’ had non-zero exit status.

Therefore, I went ahead and downloaded the compatible slam package from the CRAN archives. I downloaded slam_0.1-26

I tried to install it using

install.packages("/Downloads/slam_0.1-26.tar.gz", repos = NULL, type="source")

and got the following error

Installing package(s) into ‘/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
* installing *source* package 'slam' ...
** package 'slam' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
**ERROR: compilation failed for package 'slam'**
* removing '/Documents/R/win-library/2.15/slam'
Warning in install.packages :
  running command 'C:/PROGRA~1/R/R-215~1.2/bin/x64/R CMD INSTALL -l "/Documents/R/win-library/2.15"   "/Downloads/slam_0.1-26.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘/Downloads/slam_0.1-26.tar.gz’ had non-zero exit status

How do I go about installing slam and eventually tm?

来源:https://stackoverflow.com/questions/39884276/r-compilation-failed-for-package-slam

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!