# About the old binary version of iGraph

**URL:** <https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307>\
**Category:** Installation\
**Tags:** R\
**Created:** [25 July 2022 01:30 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307 "2022-07-25T01:30:10Z")\
**Posts on this page:** 15\
**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:** [25 July 2022 01:30 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/1 "2022-07-25T01:30:10Z")

</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:** ![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:** [25 July 2022 09:00 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/2 "2022-07-25T09:00:37Z")

</div>

CRAN only stores Windows binaries for the latest release of each package. In order to install older versions, you must compile them from sources.

To compile packages, you must have RTools installed. Pick the RTools version that matches your R version. Additionally, igraph’s dependencies must be installed as well: `libxml2`, `gmp`, `glpk`. These dependencies are not optional on Windows. With recent versions of RTools, you can install these using `pacman` as explained in the RTools documentation, and [here](https://github.com/igraph/rigraph/#installation).

---

<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:** [28 July 2022 03:46 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/3 "2022-07-28T03:46:36Z")

</div>

It’s frustrating. In the latest versions of R and rtools, libxml2, GMP and GLPK have been installed by command, but the following problems still occur。  
----\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*-----------------------------------

```auto
> install.packages("C:/Users/Administrator/Desktop/R/yilaibao/shinystan_2.6.0的依赖包/threejs_0.3.1的依赖包/igraph_1.2.1.tar.gz", repos = NULL, lib="C:/Program Files/R/R-4.2.1/library")
* installing *source* package 'igraph' ...
** 成功将'igraph'程序包解包并MD5和检查
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls -O2 -mfpmath=sse -msse2 -mstackrealign -c AMD/Source/amd.f -o AMD/Source/amd.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I/include/libxml2 -I/include -DLIBXML_STATIC -DUSING_R -DHAVE_FMEMOPEN=0 -DHAVE_OPEN_MEMSTREAM=0 -DHAVE_RINTF -DWin32 -DHAVE_LIBXML -Wall -DPACKAGE_VERSION=\"1.2.0\" -DHAVE_FMIN=1 -DHAVE_LOG2=1 -DHAVE_SNPRINTF -Ics -I/include -DHAVE_GLPK=1 -Iplfit -Iprpack -DIGRAPH_THREAD_LOCAL=/**/ -DPRPACK_IGRAPH_SUPPORT -I. -Iinclude -ICHOLMOD/Include -IAMD/Include -ICOLAMD/Include -ISuiteSparse_config -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT -I/include -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -DINTERNAL_ARPACK -I. -I/include -DHAVE_GFORTRAN -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c AMD/Source/amd_1.c -o AMD/Source/amd_1.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I/include/libxml2 -I/include -DLIBXML_STATIC -DUSING_R -DHAVE_FMEMOPEN=0 -DHAVE_OPEN_MEMSTREAM=0 -DHAVE_RINTF -DWin32 -DHAVE_LIBXML -Wall -DPACKAGE_VERSION=\"1.2.0\" -DHAVE_FMIN=1 -DHAVE_LOG2=1 -DHAVE_SNPRINTF -Ics -I/include -DHAVE_GLPK=1 -Iplfit -Iprpack -DIGRAPH_THREAD_LOCAL=/**/ -DPRPACK_IGRAPH_SUPPORT -I. -Iinclude -ICHOLMOD/Include -IAMD/Include -ICOLAMD/Include -ISuiteSparse_config -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT -I/include -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -DINTERNAL_ARPACK -I. -I/include -DHAVE_GFORTRAN -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c AMD/Source/amd_2.c -o AMD/Source/amd_2.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I/include/libxml2 -I/include -DLIBXML_STATIC -DUSING_R -DHAVE_FMEMOPEN=0 -DHAVE_OPEN_MEMSTREAM=0 -DHAVE_RINTF -DWin32 -DHAVE_LIBXML -Wall -DPACKAGE_VERSION=\"1.2.0\" -DHAVE_FMIN=1 -DHAVE_LOG2=1 -DHAVE_SNPRINTF -Ics -I/include -DHAVE_GLPK=1 -Iplfit -Iprpack -DIGRAPH_THREAD_LOCAL=/**/ -DPRPACK_IGRAPH_SUPPORT -I. -Iinclude -ICHOLMOD/Include -IAMD/Include -ICOLAMD/Include -ISuiteSparse_config -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT -I/include -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -DINTERNAL_ARPACK -I. -I/include -DHAVE_GFORTRAN -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c AMD/Source/amd_aat.c -o AMD/Source/amd_aat.o
       if (igraph_i_interruption_handler) { if (igraph_allow_interruption(NULL) != IGRAPH_SUCCESS) return IGRAPH_INTERRUPTED; \
            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adjlist.c:217:5: note: in expansion of macro 'IGRAPH_ALLOW_INTERRUPTION'
     IGRAPH_ALLOW_INTERRUPTION();
     ^ ~~~~~~~~~~~~~~~~~~~~~~~~
adjlist.c: In function 'igraph_inclist_init':
igraph_interrupt_internal.h:58:12: error: 'igraph_i_interruption_handler' undeclared (first use in this function); did you mean 'igraph_set_interruption_handler'?
        if (igraph_i_interruption_handler) { if (igraph_allow_interruption(NULL) != IGRAPH_SUCCESS) return IGRAPH_INTERRUPTED; \
            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adjlist.c:578:5: note: in expansion of macro 'IGRAPH_ALLOW_INTERRUPTION'
     IGRAPH_ALLOW_INTERRUPTION();
     ^ ~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:253: adjlist.o] Error 1
ERROR: compilation failed for package 'igraph'
* removing 'C:/Program Files/R/R-4.2.1/library/igraph'

```

---

<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:** [28 July 2022 06:11 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/4 "2022-07-28T06:11:31Z")

</div>

It’s best to just state that compiling old software is often not going to be easy, and to make it work, you may need to recreate the environment which was current at the time when the software was released. We will not be able to offer much support for such very old versions, and we do not recommend using old versions for any new work.

That said, here are some tips which may be helpful.

- Why do you need to install such an old version? What problem are you trying to solve? Given the difficulties, I would think twice before going down this route. Are you sure this is not an [XY problem](https://xyproblem.info/)? If you observe (or suspect) a difference in behaviour compared to recent versions, you can ask us about what has changed, and we _might_ be able to offer some hints. The NEWS file claims no user-visible changes between 1.2.1 and 1.2.6. 1.2.7 introduces quite a few changes under the hood, and so does 1.3.0. Consider these your milestone versions.

- If you are determined to go down this route, I suggest you the following way to install the package: `remotes::install_version('igraph', '1.2.6')`. This automates the process, and eliminates some potential mistakes you _might_ be making.

- The build process is different between Windows and Linux/macOS. If you are determined to get old versions working, you may have better luck compiling on Linux.

- Be prepared that you may need to recreate at least some of the environment which was current when that old version was released. On my macOS system, using GCC 12, Clang 14, and R 4.2.1, version 1.2.6 compiles fine, but 1.2.3 does not, probably due to a change in gfortran. It may be necessary to use an older gfortran.

---

<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:35 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/5 "2022-07-29T00:35:54Z")

</div>

It’s too difficult, which seriously affects my interest in learning

---

<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:** [29 July 2022 05:42 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/6 "2022-07-29T05:42:28Z")

</div>

Are you looking to just learn igraph? Then why are you not using the latest version?

---

<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 06:52 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/7 "2022-07-29T06:52:22Z")

</div>

No, I’m studying the application of R language in finance. I recently bought a book with code on it, but it can’t run. The author said that it needs to be restored to the running environment three years ago. Do you need this code? I can email you

---

<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:** [29 July 2022 07:25 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/8 "2022-07-29T07:25:07Z")

</div>

In that case, you should use the latest version of igraph.

If some code you found in the book behaves differently than the book claims, you are welcome to ask about it here on this forum.

More than likely, the change in the behaviour is due to a bugfix in igraph, or due to newly added checks that input passed to igraph functions is valid. You wouldn’t want to get incorrect results due to bugs, right? (Either bugs in old versions in igraph, or bugs in book’s code that old igraph versions would not alert you about.)

* * *

Note that there are almost a thousand packages that depend on igraph. Before a new version of igraph is published, we check that all of these thousand packages continue to function as before. This is required by CRAN policy. Backwards compatibility is not going to be broken arbitrarily.

---

<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 07:51 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/9 "2022-07-29T07:51:45Z")

</div>

Your statement is very correct. I can try it

---

<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:** [29 July 2022 09:28 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/10 "2022-07-29T09:28:04Z")

</div>

> [@song](#):
>
> `gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I/include/libxml2`

Just chiming in on the compilation issues. The line above (taken directly from the third post in this topic) does not seem correct; it sets the include path to `/include` and `/include/libxml2`, which are very likely to be incorrect. The reason for that is a deeper change that happened between R 4.1 and R 4.2 in R itself. Let me elaborate on that a bit.

Before R 4.2, R used the `msvcrt` C runtime on Windows. In R 4.2, R switched to using the newer and better `ucrt` runtime. However, this meant that lots of packages that compiled just fine on R 4.1 did not compile on R 4.2. The solution from R’s authors was to require package authors to supply _two_ build configuration files on Windows; `Makevars.win` is for R 4.1 and before, and `Makevars.ucrt` is for R 4.2 and after. Newer igraph versions supply _both_, so they compile just fine in both versions. _Older_ igraph versions like igraph 1.2.1, which came _before_ R started making the transition to `ucrt`, _don’t_ supply `Makevars.ucrt`, and hence they cannot compile on Windows with newer versions of R. This is completely outside of our control; R 4.2 wasn’t around when igraph 1.2.1 was released so we couldn’t have prepared for that.

The point is: if you want to compile igraph 1.2.1, you need to go back in time to when igraph 1.2.1 was released, and try to replicate the build environment for that date. This includes installing an _older_ version of R (4.1 would probably work; if it doesn’t, try 4.0), and the corresponding developer tools for that version of R. I know it’s complex, that’s why we are encouraging you to just stick to the latest version of R and igraph, and if something doesn’t work from the example code of your book, let’s try to fix what’s wrong with the code instead.

---

<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:** [1 August 2022 07:36 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/11 "2022-08-01T07:36:16Z")

</div>

I give you this code, can you run it? What is your email?

---

<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:** [2 August 2022 03:40 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/12 "2022-08-02T03:40:58Z")

</div>

I have the source code of this book, but I have to travel under the latest R package. I have limited knowledge and can’t troubleshoot errors. What is your email? I’ll give you the source code. I want it to work normally under the latest R package. Thank you.

---

<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:** [2 August 2022 10:54 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/13 "2022-08-02T10:54:10Z")

</div>

Unfortunately, going through the code in that book and fixing it for you is outside the scope of support that we can offer in these discussion forums. I’d recommend you to start processing the code yourself, and if you have specific problems that you run into and you cannot solve yourself on your own, show us what you tried so far and we’ll see what we can do there.

---

<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:** [3 August 2022 01:19 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/14 "2022-08-03T01:19:57Z")

</div>

I’m disappointed to hear this explanation，But I can pay

---

<div class="post-metadata">

**Author:** ![KeesP](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@KeesP](https://igraph.discourse.group/u/KeesP)\
**Post date:** [3 August 2022 09:03 UTC](https://igraph.discourse.group/t/about-the-old-binary-version-of-igraph/1307/15 "2022-08-03T09:03:21Z")

</div>

Just show an example of an error. Then it will become clear what is going on. There is no guarantee that the code from the book will work in the obsolete version of R.

It is interesting to understand why old code no longer works.

If you want to pay, you could contribute to the igraph project.
