# compilation failed for package ‘igraph’ under win7

**URL:** <https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win7/1301>\
**Category:** Installation\
**Tags:** R\
**Created:** [22 July 2022 08:05 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win7/1301 "2022-07-22T08:05:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![song](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/song/32/812_2.png) [@song](https://igraph.discourse.group/u/song)\
**Post date:** [22 July 2022 08:05 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win7/1301/1 "2022-07-22T08:05:16Z")

</div>

The problem that bothered me for several weeks, because of my work, I had to compile with the old version of iGraph source code.

At present, my R version is 3.5.1 and rtools35

But when compiling iGraph\_ 1.2.3.tar.gz, the following problems always occur.

## I hope someone can give me a way to solve the problem. Thank you very much

igraph\_glpk\_support.h:36:18: fatal error: glpk.h: No such file or directory  
#include \<glpk.h\>  
^  
compilation terminated.  
make: \*\*\* [C:/PROGRA~1/R/R-35~1.1/etc/i386/Makeconf:208: feedback\_arc\_set.o] Error 1  
ERROR: compilation failed for package ‘igraph’

- removing ‘C:/Program Files/R/R-3.5.1/library/igraph’  
In R CMD INSTALL  
Warning in install.packages :  
installation of package ‘C:/Users/Administrator/Desktop/新建文件夹/igraph\_1.2.3.tar.gz’ had non-zero exit status

---

<div class="post-metadata">

**Author:** ![vtraag](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/vtraag/32/38_2.png) [@vtraag](https://igraph.discourse.group/u/vtraag)\
**Post date:** [22 July 2022 08:17 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win7/1301/2 "2022-07-22T08:17:57Z")

</div>

The problem is that `GLPK` is not installed. Please follow the instructions as outlined [here](https://github.com/igraph/rigraph/issues/490).

> <https://github.com/igraph/rigraph/issues/490>
>
> I am trying to install igraph from CRAN with \`install.packages("igraph")\`, and I… get an error like this:
> 
> \`\`\`
> In file included from feedback\_arc\_set.c:31:
> igraph\_glpk\_support.h:36:10: fatal error: glpk.h: No such file or directory
> #include \<glpk.h\>
> ^ ~~~~~~~
> compilation terminated.
> \`\`\`
> 
> How do I solve this?

---

<div class="post-metadata">

**Author:** ![song](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/song/32/812_2.png) [@song](https://igraph.discourse.group/u/song)\
**Post date:** [25 July 2022 02:46 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win7/1301/3 "2022-07-25T02:46:48Z")

</div>

I want to restore to the R environment 3 years ago. I need to install the current version of iGraph. Do you know where to download the old binary version of iGraph? For example, where can I download the binary version of iGraph 1.2.3?

---

<div class="post-metadata">

**Author:** ![tamas](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/tamas/32/1261_2.png) [@tamas](https://igraph.discourse.group/u/tamas)\
**Post date:** [28 July 2022 18:53 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win7/1301/4 "2022-07-28T18:53:46Z")

</div>

Hmmm, it looks like CRAN archives the source code of older versions but not the binaries. So, you can find the source code here:

[https://cran.r-project.org/src/contrib/Archive/igraph/](https://cran.r-project.org/src/contrib/Archive/igraph/)

You’ll need to grab the tarball, and then run `R CMD INSTALL path-to-igraph-1.2.3.tar.gz` on it. You will still need to compile the source, though, so you’ll need to install GLPK as outlined above.

---

<div class="post-metadata">

**Author:** ![song](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/song/32/812_2.png) [@song](https://igraph.discourse.group/u/song)\
**Post date:** [29 July 2022 00:34 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win7/1301/5 "2022-07-29T00:34:08Z")

</div>

My computer has installed GLPK, but there are other problems when compiling.
