go-glpk
go-glpk copied to clipboard
fatal error: glpk.h: No such file or directory #include <glpk.h>
Can't figure out a solution.
You have to first install GLPK.
For example under Debian the package is named libglpk-dev
.
It may have a different name on your system.
I'm also getting the same error while installing the glpk for my python. Below is the exact error that I face.
In file included from src/glpk.c:21: src/lp.h:24:10: fatal error: 'glpk.h' file not found #include "glpk.h" ^ 1 error generated. error: command '/usr/bin/clang' failed with exit status 1
Manish,
First of all, what you're describing is a problem with an unrelated project to go-glpk. You would probably get more help posting this on the page accompanying your python glpk interface library.
To be more helpful though, Glpk is written in C. Both go-glpk and whichever python library you are referring to are foreign function interfaces to that C code.
In order to use them you have to have the glpk c source code present on your machine and a path set to it so that clang can find it, as suggested by @lukpank.
I'm guessing you might be on a Mac from the clang error message. In which case I would suggest using homebrew to install the glpk dev package which includes the source code.