संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
परिचय
इस गाइड में, Linux पर C++ के लिए OR-टूल इंस्टॉल करने का तरीका बताया गया है.
हालांकि, ये निर्देश Linux के अन्य वैरिएंट पर भी काम कर सकते हैं, लेकिन हम
इनकी सिर्फ़ उन मशीनों पर टेस्ट किया है जो नीचे दी गई ज़रूरी शर्तों को पूरा करती हैं:
अल्पाइन एज 64-बिट (x86_64)
Centos 7 LTS 64-बिट (x86_64)
Debian SID 64-बिट (x86_64)
Debian 11 (बुल्सआई) 64-बिट (x86_64)
Fedora 38 64-बिट (x86_64)
Fedora 37 64-बिट (x86_64)
OpenSuse Leap 64-बिट (x86_64)
Ubuntu 24.04 64-बिट (x86_64)
Ubuntu 22.04 एलटीएस 64-बिट (x86_64)
Ubuntu 20.04 LTS 64-बिट (x86_64)
ज़रूरी शर्तें
OR-टूल इंस्टॉल करने के लिए ज़रूरी शर्तों के बारे में यहां दिए गए सेक्शन में बताया गया है.
C++ टूल
C++ टूल इंस्टॉल करने के लिए, टर्मिनल विंडो खोलें और यह डालें:
[null,null,["आखिरी बार 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)."]]