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
-We ultimately resolved this by installing Rglpk version 0.6-3 from MRAN, which happened to have a Mac binary available for version 0.6-3 (but not 0.6-4), but given MRAN is being shut down on July 1, 2023, this won't be an option farther in the future
Your sessionInfo shows Snow Leopard rather than Monterrey and R3.6.1. This poses the possibility of mounting deferred maintenance debt.
While RStudio officially supports macOS current releases and the two most recent before, whether it runs on older versions is potentially dicey. At least, it’s worth running to ground why Snow Leopard, rather than Monterrey, is showing.
As far as R, I like to keep close to the current release. I’m not in a hurry to go from 4.2 to 4.3, but if I slipped behind while it went to 4.5 I’d make the time to do make it happen. When things break it can take a long time to realize that R versioning is the cause.
curl -LO https://mac.r-project.org/bin/darwin17/x86_64/glpk-5.0-darwin.17-x86_64.tar.xz
sudo tar xzf glpk-5.0-darwin.17-x86_64.tar.xz -C /
After this I can install Rglpk without issues:
install.packages("Rglpk", type = "source")
Alternatively, you can install the CRAN binary package from the CRAN archive repository. This is a slightly older version, but it does not need any external libraries:
install.packages(
"Rglpk",
repos = "https://cran-archive.r-project.org",
type = "binary"
)