All pages
Powered by GitBook
1 of 1

Loading...

Build Environment Setup for Linux

Lists required tools and dependencies for building MariaDB on Linux, and how to install them using package managers.

Required Tools

The following is a list of tools that are required for building MariaDB on Linux and Mac OS X. Most, if not all, of these will exist as packages in your distribution's package repositories, so check there first. See Building MariaDB on Ubuntu, Building MariaDB on CentOS, and Building MariaDB on Gentoo pages for specific requirements for those platforms.

  • git

  • or

  • or

  • or libncurses6

  • or zlib-devel

  • or libevent-devel

  • or

  • (optional)

  • (compression library, optional)

  • (only needed if running )

  • (only needed if you want to use the )

  • libxml2-devel or libxml-dev

  • boost

  • libaio-devel or libaio-dev

  • systemd-devel or systemd-dev

  • pcre2-devel (optiona, will be automatically downloaded and installed if not on the system)

  • ccache ; Will speed up builds if you are going to use the scripts in the BUILD directory.

  • ctags or universal-ctags ; If you plan to use BUILD scripts and local editors

You can install these programs individually through your package manager.

In addition, some package managers support the use a build dependency command. When using this command, the package manager retrieves a list of build dependencies and install them for you, making it much easier to get started on the compile. The actual option varies, depending on the distribution you use.

On Ubuntu and Debian you can use the build-dep command.

Fedora uses the builddep command with DNF.

If building on Centos 7, use the .

With openSUSE and SUSE, you can use the source-install command.

Each of these commands works off of the release of MariaDB provided in the official software repositories of the given distribution. In some instances and especially in older versions of Linux, MariaDB may not be available in the official repositories. In these cases you can use the MariaDB repositories as an alternative.

Bear in mind, the release of MariaDB provided by your distribution may not be the same as the version you are trying to install. Additionally, the package managers don't always retrieve all of the packages you need to compile MariaDB. There may be some missed or unlisted in the process. When this is the case, CMake fails during checks with an error message telling you what's missing.

Note: On Debian-based distributions, you may receive a "You must put some 'source' URIs in your sources.list" error. To avoid this, ensure that /etc/apt/sources.list contains the source repositories.

For example, for Debian buster:

Refer to the documentation for your Linux distribution for how to do this on your system.

After editing the sources.list, do:

...and then the above mentioned build-dep command.

Note: On openSUSE the source package repository may be disabled. The following command will enable it:

After enabling it, you will be able to run the zypper command to install the build dependencies.

You should now have your build environment set up and can proceed to and then using the to build MariadB (or following the steps for your Linux distribution or ).

See Also

This page is licensed: CC BY-SA / Gnu FDL

gzip
tar
gcc/g++ 4.8.5 or later, recommend above 9
clang/clang++
GNU make 3.75 or later
Ninja
bison (3.0)
libncurses
zlib-dev
libevent-dev
cmake above 2.8.7 though preferably above 3.3
gnutls
openssl
jemalloc
snappy
valgrind
mysql-test-run --valgrind
libcurl
S3 storage engine
building MariaDB on Centos instructions
Getting the MariaDB Source Code
Generic Build Instructions
Creating a MariaDB Binary Tarball
# apt build-dep mariadb-server
# dnf builddep mariadb-server
# zypper source-install -d mariadb
deb http://ftp.debian.org/debian buster main contrib
deb http://security.debian.org buster/updates main contrib
deb-src http://ftp.debian.org/debian buster main contrib
deb-src  http://security.debian.org buster/updates main contrib
sudo apt update
sudo zypper mr -er repo-source
Installing Galera from source