为 r 安装 rsymphony 包(非零退出状态)

Installing rsymphony package for r (non-zero exit status)

我正在尝试安装 Rsymphony 以便能够安装 fPortfolio。 我在尝试安装时遇到错误;

install.packages("Rsymphony") Installing package into ‘C:/Users/Olve/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘Rsymphony’ Do you want to attempt to install these from sources? y/n: y installing the source package ‘Rsymphony’

尝试 URL 'http://cran.rstudio.com/src/contrib/Rsymphony_0.1-22.tar.gz' 内容类型 'application/x-gzip' 长度 7447 字节 下载 7447 字节

下载的源码包在 'C:\Users\Olve\AppData\Local\Temp\RtmpUjRTsG\downloaded_packages'

我将 RStudio 与 R 3.3 和 Windows 7 64 位一起使用,我看到的大多数与此相关的其他帖子来自 OSX 用户,得到的错误消息略有不同,none 他们的解决方案对我有帮助(下载和安装 symphony,也不确定我是否正确完成了此操作)

编辑:Stedy 的解决方案有效,谢谢。

因为它是 Windows 7 机器,您需要使用 zip 文件而不是 tar 文件:

> install.packages('Rsymphony')
Installing package into ‘C:/Users/zstednic/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘Rsymphony’
  These will not be installed
> install.packages('Rsymphony_0.1-22.zip', repos=NULL)
Installing package into ‘C:/Users/zstednic/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
package ‘Rsymphony’ successfully unpacked and MD5 sums checked
> library(Rsymphony)
>