I am troubleshooting the installation of the Rglpk
package on MacOS 12.6.5 (Monterrey).
The error message when trying to install Rglpk
version 0.6-4 (from source) is:
'/bin/sh: line 0: cd: GLPK: No such file or directory'
make: *** [GLPK.ts] Error 1
ERROR: compilation file for package 'Rglpk'
Here is what I have verified so far:
- Per CRAN, Rglpk requires (as a system dependency) installation of glpk (GLPK - GNU Project - Free Software Foundation (FSF)).
- Using Homebrew, I can see both glpk and its dependency gmp are installed. They are installed under /usr/local/Cellar/, with symlinks created under /usr/local/opt/ and /usr/local/bin/.
- Other Mac users have been able to install glpk and then install
Rglpk
without issue - Running 'brew link' did not solve the issue
- I verified that a version of gcc is installed (gcc6), other packages are working to compile from source (using gcc), and and that flags are set in the Makevars file referencing the correct version of gcc
$PATH /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin
sessionInfo:
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X Snow Leopard 12.6.5
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1]
compiler_3.6.1 tools_3.6.1