compilation failed for package ‘igraph’ under win7

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

The problem is that GLPK is not installed. Please follow the instructions as outlined here.

1 Like

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?

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/

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.

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