Skip to content

Commit

Permalink
docs: improve installation and troubleshooting instructions (#1184)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviator-app[bot] authored Feb 1, 2024
2 parents 0e0e733 + 22aeb1b commit 5205103
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,22 @@ or Github, with the `devtools` package:
devtools::install_github("igraph/rigraph")
```

When compiling from sources, make sure that you have C, C++ and Fortran
compilers, as well as development packages for `glpk`, `gmp` and `libxml2`.
On Debian/Ubuntu, use `apt install libglpk-dev libgmp-dev libxml2-dev`.
On Fedora, use `yum install glpk-devel gmp-devel libxml2-devel`.

For installation from source on Windows, you need to have
[RTools](https://cran.r-project.org/bin/windows/Rtools/) installed.
Additionally, the three system requirements of `glpk`, `libxml2` and `gmp` are
not optional, but hard requirements. For versions R >= 4.0 you can install these
using
For versions R >= 4.0 you can install the dependencies using:

```
pacman -Sy mingw-w64-{i686,x86_64}-glpk mingw-w64-{i686,x86_64}-libxml2 mingw-w64-{i686,x86_64}-gmp
pacman -Sy mingw-w64-{i686,x86_64}-glpk mingw-w64-{i686,x86_64}-gmp mingw-w64-{i686,x86_64}-libxml2
```

See the package wiki for more information on [installation troubleshooting](https://r.igraph.org/articles/installation-troubleshooting).
## Installation troubleshooting

See the [Installation FAQ](https://r.igraph.org/articles/installation-troubleshooting).

## Documentation

Expand Down
14 changes: 8 additions & 6 deletions vignettes/articles/installation-troubleshooting.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,18 @@ If you decide to try to compile from sources anyway, basic requirements are list
- Instructions to install [Rtools for R4.2.x](https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html) and [Rtools for R4.3.x](https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html).
- Make sure you have the GLPK C library installed. This is not the same as the Rglpk R package. Instructions for installing libraries for Rtools4 on Windows are [here](https://cran.r-project.org/bin/windows/Rtools/)

## fatal error: glpk.h: No such file or directory

This error occurs only on Windows, when trying to compile igraph from sources. Please refer to [the previous section](#cannot-compile-igraph-from-sources-on-windows-or-macos).

## Cannot compile igraph from sources on Linux

Since CRAN does not provide binary packages for Linux, Linux users usually need to compile igraph from sources. In order to do so, make sure that you have all the prerequisites:

- C, C++ and Fortran compilers. On Debian-based distros, use `sudo apt install build-essential gfortran`.
- Development packages for `libxml2` and `glpk`. On Debian-based distros, use `sudo apt install libxml2-dev libglpk-dev`.
- C, C++ and Fortran compilers. On Debian-based distros, use `sudo apt install build-essential gfortran`. On Fedora, use `yum install gcc gcc-c++ gcc-gfortran`.
- Development packages for `glpk`, `gmp` and `libxml2`. On Debian-based distros, use `sudo apt install libglpk-dev libgmp-dev libxml2-dev`. On Fedora, use `yum install glpk-devel gmp-devel libxml2-devel`.

## fatal error: glpk.h: No such file or directory

If you are using Windows or macOS, please refer to [Cannot compile igraph from sources on Windows or macOS](#cannot-compile-igraph-from-sources-on-windows-or-macos).

If you are using Linux, please refer to [Cannot compile igraph from sources on Linux](#cannot-compile-igraph-from-sources-on-linux).

## libgfortran.so.4: cannot open shared object file: No such file or directory

Expand Down

0 comments on commit 5205103

Please sign in to comment.