# compilation failed for package 'igraph' under win10

**URL:** <https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win10/1180>\
**Category:** Installation\
**Tags:** R\
**Created:** [15 April 2022 03:12 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win10/1180 "2022-04-15T03:12:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yang\_ECNU](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/yang_ecnu/32/744_2.png) [@Yang\_ECNU](https://igraph.discourse.group/u/Yang_ECNU)\
**Post date:** [15 April 2022 03:12 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win10/1180/1 "2022-04-15T03:12:01Z")

</div>

To whom it may concern,  
I failed to compile igraph. Below is the info:  
In file included from core/community/optimal\_modularity.c:32:0:  
core/internal/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-36~1.0/etc/i386/Makeconf:208: core/community/optimal\_modularity.o] Error 1  
ERROR: compilation failed for package ‘igraph’

- removing ‘C:/Users/huyang/Documents/R/win-library/3.6/igraph’

- restoring previous ‘C:/Users/huyang/Documents/R/win-library/3.6/igraph’  
Warning in install.packages :  
installation of package ‘igraph’ had non-zero exit status

Matrix products: default

locale:  
[1] LC\_COLLATE=Chinese (Simplified)\_China.936 LC\_CTYPE=Chinese (Simplified)\_China.936  
[3] LC\_MONETARY=Chinese (Simplified)\_China.936 LC\_NUMERIC=C  
[5] LC\_TIME=Chinese (Simplified)\_China.936

attached base packages:  
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):  
[1] compiler\_3.6.0 Matrix\_1.2-17 cli\_3.2.0 tools\_3.6.0 yaml\_2.2.1  
[6] grid\_3.6.0 lattice\_0.20-38

```
Thanks for your help. Looking forward to your reply!

```

Best,  
Yang

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [15 April 2022 08:15 UTC](https://igraph.discourse.group/t/compilation-failed-for-package-igraph-under-win10/1180/2 "2022-04-15T08:15:43Z")

</div>

Why are you trying to compile igraph from source instead of using the CRAN binaries?

Given that you decided to compile from source, did you read the instructions on how to do this and follow them?
