Cómo instalar las herramientas OR para C++ desde objetos binarios en Linux
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Introducción
Esta guía explica cómo instalar OR-Tools para C++ en Linux.
Aunque estas instrucciones también podrían funcionar en otras variantes de Linux,
solo los probaron en máquinas que cumplen con los siguientes requisitos:
Alpine Edge 64 bits (x86_64)
Centos 7 LTS de 64 bits (x86_64)
SID de Debian de 64 bits (x86_64)
Debian 11 (bullseye) de 64 bits (x86_64)
Fedora 38 de 64 bits (x86_64)
Fedora 37 de 64 bits (x86_64)
OpenSuse Leap de 64 bits (x86_64)
Ubuntu 24.04 de 64 bits (x86_64)
Ubuntu 22.04 LTS de 64 bits (x86_64)
Ubuntu 20.04 LTS de 64 bits (x86_64)
Requisitos previos
Las siguientes secciones describen los requisitos previos para instalar OR-Tools.
Herramientas de C++
Para instalar herramientas de C++, abre una ventana de terminal y escribe lo siguiente:
Para probar las instalaciones de C++, abre una ventana de terminal y ve a
el directorio en el que se descomprime la distribución binaria. Luego, ingresa
siguiente comando:
maketest
Esto ejecuta una selección de ejemplos para las herramientas OR. Si todos los ejemplos se ejecutan
con éxito, estás listo para
comienza a usar las herramientas OR.
[null,null,["Última actualización: 2024-08-23 (UTC)"],[[["\u003cp\u003eThis guide provides instructions for installing Google's OR-Tools for C++ development on various Linux distributions, specifically focusing on the x86_64 architecture.\u003c/p\u003e\n"],["\u003cp\u003eBefore installing OR-Tools, ensure you have the necessary C++ development tools installed by following the distribution-specific commands provided.\u003c/p\u003e\n"],["\u003cp\u003eDownload the pre-built binary distribution of OR-Tools for your Linux distribution and extract it to a desired location.\u003c/p\u003e\n"],["\u003cp\u003eValidate your OR-Tools installation by running the provided test suite using the \u003ccode\u003emake test\u003c/code\u003e command within the extracted directory.\u003c/p\u003e\n"]]],["This guide details installing OR-Tools for C++ on various Linux distributions (Alpine, Centos, Debian, Fedora, OpenSuse, Ubuntu) with x86_64 architecture. First, install C++ tools via terminal commands specific to each distribution, including packages like `build-essential`, `cmake`, and `gcc-c++`. Next, download and extract the appropriate OR-Tools binary from provided links based on the Linux system. Finally, validate the installation by navigating to the extracted directory and running `make test`.\n"],null,["# Installing OR-Tools for C++ from Binary on Linux\n\nIntroduction\n------------\n\nThis guide explains how to install OR-Tools for C++ on Linux.\n\nAlthough these instructions might also work on other Linux variants, we\nhave only tested them on machines meeting the following requirements:\n\n\n- Alpine Edge 64-bit (x86_64)\n- Centos 7 LTS 64-bit (x86_64)\n- Debian SID 64-bit (x86_64)\n- Debian 11 (bullseye) 64-bit (x86_64)\n- Fedora 38 64-bit (x86_64)\n- Fedora 37 64-bit (x86_64)\n- OpenSuse Leap 64-bit (x86_64)\n- Ubuntu 24.10 64-bit (x86_64)\n- Ubuntu 22.04 LTS 64-bit (x86_64)\n- Ubuntu 20.04 LTS 64-bit (x86_64)\n\n\u003cbr /\u003e\n\n| **Note:** OR-Tools only provides archives for the **x86_64** (also known as **amd64**) architecture.\n\nPrerequisites\n-------------\n\nThe following sections describe the prerequisites for installing OR-Tools.\n\n### C++ tools\n\nTo install C++ tools, open a terminal window and enter: \n\n### Alpine\n\n apk add alpine-sdk linux-headers cmake lsb-release-minimal\n\n### Centos\n\n sudo yum groupinstall -y 'Development Tools'\n sudo yum install -y pkgconfig redhat-lsb-core\n\n### Debian\n\n sudo apt update\n sudo apt install -y build-essential cmake lsb-release\n\n### Fedora\n\n sudo dnf groupinstall -y 'Development Tools'\n sudo dnf install -y gcc-c++ cmake redhat-lsb-core\n\n### Fedora\n\n sudo dnf groupinstall -y 'Development Tools'\n sudo dnf install -y gcc-c++ cmake redhat-lsb-core\n\n### OpenSUSE\n\n sudo zypper refresh\n sudo zypper install -y git gcc11 gcc11-c++ lsb-release\n\n### Ubuntu\n\n sudo apt update\n sudo apt install -y build-essential cmake lsb-release\n\n### Ubuntu\n\n sudo apt update\n sudo apt install -y build-essential cmake lsb-release\n\n### Ubuntu\n\n sudo apt update\n sudo apt install -y build-essential cmake lsb-release\n\nInstalling OR-Tools\n-------------------\n\nTake the following steps to install the OR-Tools library for C++:\n\nDownload and extract the binary distribution for your system:\n\n\n- [Almalinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_almalinux-9_cpp_v9.12.4544.tar.gz)\n- [Alpine Edge](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_alpine-edge_cpp_v9.12.4544.tar.gz)\n- [Debian Sid](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-sid_cpp_v9.12.4544.tar.gz)\n- [Debian 12](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-12_cpp_v9.12.4544.tar.gz)\n- [Debian 11](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-11_cpp_v9.12.4544.tar.gz)\n- [Fedora 41](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-41_cpp_v9.12.4544.tar.gz)\n- [Fedora 40](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-40_cpp_v9.12.4544.tar.gz)\n- [OpenSuse Leap](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_opensuse-leap_cpp_v9.12.4544.tar.gz)\n- [Rockylinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_rockylinux-9_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 24.10](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.10_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 24.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.04_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 22.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-22.04_cpp_v9.12.4544.tar.gz)\n- [Ubuntu 20.04 LTS](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-20.04_cpp_v9.12.4544.tar.gz)\n\n\u003cbr /\u003e\n\nValidate your installation\n--------------------------\n\nTo test your C++ installations, open a terminal window and navigate to\nthe directory where you unpacked the binary distribution. Then enter the\nfollowing command:\n\n\n make test\n\n\u003cbr /\u003e\n\nThis runs a selection of examples for OR-Tools. If all the examples run\nsuccessfully, you are ready to\n[get started with OR-Tools](../../introduction/cpp)."]]