Build the source code
NoteCentOS 7 is the recommended Linux development and production platform for YugabyteDB.
Install necessary packages
Update packages on your system, install development tools and additional packages:
sudo apt-get update sudo apt-get install uuid-dev libbz2-dev libreadline-dev maven ninja-build \ cmake curl rsync python3-pip python3-venv zip autoconf libtool \ pkg-config libssl1.0-dev libicu-dev bison flex \ libncurses5-dev
Assuming this repository is checked out in
~/code/yugabyte-db, do the following:
cd ~/code/yugabyte-db ./yb_build.sh release
NoteIf you see errors, such as
g++: internal compiler error: Killed, the system has probably run out of memory. Try again by running the build script with less concurrency, for example,
The command above will build the release configuration, add the C++ binaries into the
build/release-gcc-dynamic-ninja directory, and create a
build/latest symlink to that directory.
If you are getting errors in the form of:
uild/release-gcc-dynamic-ninja/postgres_build/src/backend/libpq/be-secure-openssl.o: In function `my_sock_read': src/postgres/src/backend/libpq/be-secure-openssl.c:665: undefined reference to `BIO_get_data' build/release-gcc-dynamic-ninja/postgres_build/src/backend/libpq/be-secure-openssl.o: In function `my_sock_write': src/postgres/src/backend/libpq/be-secure-openssl.c:685: undefined reference to `BIO_get_data'
The code is probably not finding the right path for libssl1.0. Try a clean build
./yb_build.sh --clean release.
If that doesn't work, look into your $PATH if some other openssl version path is being used.
TipYou can find the binaries you just built in
Build Java code
YugabyteDB core is written in C++, but the repository contains Java code needed to run sample applications. To build the Java part, you need:
- JDK 8
- Apache Maven.
Also make sure Maven's bin directory is added to your
PATH (for example, by adding to your
~/.bashrc). See the example below (if you've installed Maven into
For building YugabyteDB Java code, you'll need to install Java and Apache Maven.