### 4.2.2 Requirements for compiling LilyPond

This section contains instructions on how to quickly and easily get all the software packages required to build LilyPond.

Most of the more popular Linux distributions only require a few simple commands to download all the software needed. For others, there is an explicit list of all the individual packages (as well as where to get them from) for those that are not already included in your distributions’ own repositories.

#### Fedora

The following instructions were tested on ‘Fedora 22’ and include all the software to both compile LilyPond and build the documenation.

```sudo dnf builddep lilypond --nogpgcheck
```
```sudo dnf install autoconf gcc-c++
```
• Download `texi2html 1.82` directly from: http://download.savannah.gnu.org/releases/texi2html/texi2html-1.82.tar.gz;

`texi2html` is only required if you intend to compile LilyPond’s own documentation (e.g. to help with any document writing). The version available in the Fedora repositories is too new and will not work. Extract the files into an appropriate location and then run the commands;

```./configure
make
sudo make install
```

This should install `texi2html 1.82` into `/usr/local/bin`, which will normally take priority over `/usr/bin` where the later, pre-installed versions gets put. Now verify that your operating system is able to see the correct version of `texi2html`.

```texi2html --version
```
• Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.
```sudo dnf install git
```

Also see Starting with Git.

• To use the `lily-git.tcl` GUI;
```sudo dnf install tk
```

See lily-git.

#### Linux Mint

The following instructions were tested on ‘Linux Mint 17.1’ and ‘LMDE - Betsy’ and include all the software to both compile LilyPond and build the documenation.

• Enable the sources repository;
1. Using the Software Sources GUI (located under Administration).
2. Select Official Repositories.
3. Check the Enable source code repositories box under the Source Code section.
4. Click the Update the cache button and when it has completed, close the Software Sources GUI.
```sudo apt-get build-dep lilypond
```
```sudo apt-get install autoconf fonts-texgyre texlive-lang-cyrillic
```
• Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.
```sudo apt-get install git
```

Also see Starting with Git.

• To use the `lily-git.tcl` GUI;
```sudo apt-get install tk
```

Also see lily-git.

#### OpenSUSE

The following instructions were tested on ‘OpenSUSE 13.2’ and include all the software to both compile LilyPond and build the documenation.

• Add the sources repository;  ```sudo zypper addrepo -f \ "http://download.opensuse.org/source/distribution/13.2/repo/oss/" sources ```
```sudo zypper source-install lilypond
```
```sudo zypper install make
```
• Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.
```sudo apt-get install git
```

Also see Starting with Git.

• To use the `lily-git.tcl` GUI;
```sudo zypper install tk
```

Also see lily-git.

#### Ubuntu

The following commands were tested on Ubuntu versions `14.04 LTS`, `14.10` and `15.04` and include all the software to both compile LilyPond and build the documenation.

```sudo apt-get build-dep lilypond
```
```sudo apt-get install autoconf fonts-texgyre texlive-land-cyrillic
```
• Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.
```sudo apt-get install git
```

Also see Starting with Git.

• To use the `lily-git.tcl` GUI;
```sudo apt-get install tk
```

Also see lily-git.

#### Other

The following individual software packages are required just to compile LilyPond.

• GNU Autoconf
• GNU Bison

Use version `2.0` or newer.

• GNU Compiler Collection

Use version `3.4` or newer (`4.x` recommended).

• Flex
• FontForge

Use version `20060125` or newer (we recommend using at least `20100501`); it must also be compiled with the ‘--enable-double’ switch, else this can lead to inaccurate intersection calculations which end up with poorly-rendered glyphs in the output.

• GNU gettext

Use version `0.17` or newer.

• GNU Make

Use version `3.78` or newer.

• MetaFont

The `mf-nowin`, `mf`, `mfw` or `mfont` binaries are usually packaged along with TeX.

• MetaPost

The `mpost` binary is also usually packaged with TeX.

• Perl
• Texinfo

Use version `4.11` or newer.

• Type 1 utilities

Use version `1.33` or newer.

• Cyrillic fonts

Often packaged in repositories as `texlive-lang-cyrillic`.

• TeX Gyre ‘OTF’ font packages. As of LilyPond version `2.19.26`, the previous default serif, san serif and monospace fonts now use Tex Gyre’s Schola, Heros and Cursor fonts respectively. Also See Fonts.

Some distributions do not always provide ‘OTF’ font files in the Tex Gyre packages from their repositories. Use the command `fc-list | grep texgyre` to list the fonts available to your system and check that the appropriate `*.otf` files are reported. If they are not then download and manually extract the ‘OTF’ files to either your local `~/.fonts/` directory or use the `configure` command and the `--with-texgyre-dir=/path_to_otf_files/` option.

The following font families are required:

Schola, Heros and Cursor.