安装" Rglpk"是什么问题?在Mac上?

时间:2017-08-17 07:22:36

标签: r macos

> install.packages("Rglpk")
Package which is only available in source
  form, and may need compilation of
  C/C++/Fortran: ‘Rglpk’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘Rglpk’

试开URL’https://cran.rstudio.com/src/contrib/Rglpk_0.6-3.tar.gz'
Content type 'application/x-gzip' length 20892 bytes (20 KB)
==================================================
downloaded 20 KB

* installing *source* package ‘Rglpk’ ...
** 成功将‘Rglpk’程序包解包并MD5和检查
** libs
/bin/sh: line 0: cd: GLPK: No such file or directory
make: *** [GLPK.ts] Error 1
ERROR: compilation failed for package ‘Rglpk’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rglpk’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rglpk’
Warning in install.packages :
  installation of package ‘Rglpk’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/b2/ph_1yql507ddv6d659lcm99h0000gn/T/Rtmpfm2CvV/downloaded_packages’

我的RStudio是全新的(今天刚下载) 谢谢!

1 个答案:

答案 0 :(得分:1)

rglpk仅仅是GMPK库的接口,必须在安装rglpk之前安装在系统上。对于MacOS,您可以使用Homebrewinstall it manually安装它。