FantasyFootballAnalytics / FantasyFootballAnalyticsR

R scripts and data files for the Fantasy Football Analytics website
http://fantasyfootballanalytics.net/
447 stars 1.58k forks source link

glpk dependency issues #49

Closed andrewkeithly closed 4 years ago

andrewkeithly commented 7 years ago

Running source("main.R") fails to install Rglpk due to a dependency on glpk that dependencies=TRUE can not resolve. I had to manually install glpk to resolve the issue. I'm on macOS so I used homebrew to brew install glpk.

Error:

Error in library("Rglpk") : there is no package called ‘Rglpk’

From Traceback to library("Rglpk") at Functions.R#11 it appears Rglpk did not install.

Running install.packages("Rglpk", dependencies=TRUE) gives the following output:

Installing package into ‘/usr/local/lib/R/3.4/site-library’
(as ‘lib’ is unspecified)
trying 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’ ...
** package ‘Rglpk’ successfully unpacked and MD5 sums checked
** libs
/bin/sh: line 0: cd: GLPK: No such file or directory
make: *** [GLPK.ts] Error 1
ERROR: compilation failed for package ‘Rglpk’
* removing ‘/usr/local/lib/R/3.4/site-library/Rglpk’
Warning in install.packages :
  installation of package ‘Rglpk’ had non-zero exit status

It appears to be CRAN/R problem.

mvarian commented 6 years ago

I ran into this as well on macOS and found I needed to first install the glpk package outside of R using homebrew: brew install glpk. From what I read online the solution is similar on Ubuntu/SL/CentOS with their respective package managers.

isaactpetersen commented 4 years ago

See the latest version of the app here: https://github.com/FantasyFootballAnalytics/ffanalytics