Installing OR-Tools for C++ from Binary on Linux

Introduction

This guide explains how to install OR-Tools for C++ on Linux.

Although these instructions might also work on other Linux variants, we have only tested them on machines meeting the following requirements:

  • Ubuntu 19.04/18.04/16.04 64-bit (x86_64)
  • Debian 9.4 (stretch) 64-bit (x86_64)
  • Centos 7 64-bit (x86_64)

Prerequisite: Build tools

You must install the command line build tools and few dependencies. To do so, open a terminal window and enter:

Centos 7

yum groupinstall 'Development Tools'

Debian 9

sudo apt-get -y install build-essential zlib1g-dev

Ubuntu 19.04

sudo apt-get -y install build-essential zlib1g-dev

Ubuntu 18.04

sudo apt-get -y install build-essential zlib1g-dev

Ubuntu 16.04

sudo apt-get -y install build-essential zlib1g-dev

Ubuntu 14.04

sudo apt-get -y install build-essential zlib1g-dev

Installing OR-Tools

Take the following steps to install the OR-Tools library for C++:

Download and extract the binary distribution for your system:

FlatZinc binary distributions

FlatZinc is a solver input language understood by a wide range of solvers.
OR-Tools also provides binary distributions with FlatZinc support:

Validate your installation

To test your C++ installations, open a terminal window and navigate to the directory where you unpacked the binary distribution. Then enter the following command:

make test_cc

This runs a selection of examples for OR-Tools. If all the examples run successfully, you are ready to get started with OR-Tools.

Send feedback about...