Cómo instalar las herramientas OR para .NET 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 .NET 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.
SDK de .NET Core >= 3.1
A continuación, instala la versión 3 .1 o una posterior del SDK de.NET Core. Para ello, sigue estos pasos:
abre una ventana de terminal y escribe lo siguiente:
Antes de instalar .NET, ejecuta los siguientes comandos para agregar el servidor
la clave de firma del paquete a tu lista de claves de confianza y agrégala
en un repositorio de confianza.
Antes de instalar .NET, ejecuta los siguientes comandos para agregar el servidor
la clave de firma del paquete a tu lista de claves de confianza y agrégala
en un repositorio de confianza.
Para probar las instalaciones .NET, abre una ventana de la terminal y ve a
el directorio en el que se descomprime la distribución binaria. Luego, ingresa
siguiente comando:
make test
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-22 (UTC)"],[[["\u003cp\u003eThis guide provides instructions for installing Google's OR-Tools for .Net on various Linux distributions, specifically focusing on the x86_64 architecture.\u003c/p\u003e\n"],["\u003cp\u003eBefore installing OR-Tools, ensure you have .Net Core SDK 3.1 or higher installed, with specific instructions provided for different Linux distributions.\u003c/p\u003e\n"],["\u003cp\u003eDownload the appropriate OR-Tools binary distribution for your Linux system from the provided links and extract it.\u003c/p\u003e\n"],["\u003cp\u003eValidate your installation by running the \u003ccode\u003emake test\u003c/code\u003e command in the extracted directory to execute sample OR-Tools examples.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful completion of the tests, you are ready to begin using OR-Tools for your .Net projects.\u003c/p\u003e\n"]]],["This guide details installing OR-Tools for .Net on various 64-bit Linux distributions. First, the .Net Core SDK (version 3.1 or higher) needs to be installed using specific commands for each OS like: `apk add dotnet6-sdk` (Alpine), `sudo yum install -y dotnet-sdk-6.0` (Centos), `sudo apt install -y dotnet-sdk-6.0` (Ubuntu), or similar instructions. Next, download and extract the corresponding OR-Tools binary distribution for the specific Linux version. Finally, validate the installation by running `make test` in the extracted directory.\n"],null,["# Installing OR-Tools for .Net from Binary on Linux\n\nIntroduction\n------------\n\nThis guide explains how to install OR-Tools for .Net 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### .Net Core SDK \\\u003e= 3.1\n\nNext, install the .Net Core SDK version 3.1 or higher. To do so,\nopen a terminal window and enter: \n\n### Alpine\n\n apk add dotnet6-sdk\n ref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-alpine\n\n### Centos\n\n sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm\n sudo yum install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos#centos-7\n\n### Debian\n\nBefore you install .NET, run the following commands to add the Microsoft\npackage signing key to your list of trusted keys and add the package\nrepository. \n\n wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb\n dpkg -i packages-microsoft-prod.deb\n rm packages-microsoft-prod.deb\n\n sudo apt update\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian\n\n### Fedora\n\n sudo dnf install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-fedora\n\n### Fedora\n\n sudo dnf install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-fedora\n\n### OpenSUSE\n\nBefore you install .NET, run the following commands to add the Microsoft\npackage signing key to your list of trusted keys and add the package\nrepository. \n\n sudo zypper install libicu\n sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc\n wget https://packages.microsoft.com/config/opensuse/15/prod.repo\n sudo mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo\n sudo chown root:root /etc/zypp/repos.d/microsoft-prod.repo\n\nThen you can install the .Net SDK using the following command: \n\n sudo zypper install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-opensuse\n\n### Ubuntu\n\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu\n\n### Ubuntu\n\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu\n\n### Ubuntu\n\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu\n\nInstalling OR-Tools\n-------------------\n\nTake the following steps to install the OR-Tools library for .Net:\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_dotnet_v9.12.4544.tar.gz)\n- [Alpine Edge](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_alpine-edge_dotnet_v9.12.4544.tar.gz)\n- [Debian Sid](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-sid_dotnet_v9.12.4544.tar.gz)\n- [Debian 12](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-12_dotnet_v9.12.4544.tar.gz)\n- [Debian 11](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_debian-11_dotnet_v9.12.4544.tar.gz)\n- [Fedora 41](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-41_dotnet_v9.12.4544.tar.gz)\n- [Fedora 40](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_fedora-40_dotnet_v9.12.4544.tar.gz)\n- [OpenSuse Leap](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_opensuse-leap_dotnet_v9.12.4544.tar.gz)\n- [Rockylinux 9](https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_rockylinux-9_dotnet_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_dotnet_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_dotnet_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_dotnet_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_dotnet_v9.12.4544.tar.gz)\n\n\u003cbr /\u003e\n\nValidate your installation\n--------------------------\n\nTo test your .Net 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/dotnet)."]]