Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the Dependencies

  1. Install the compilation environment.
    yum -y install cmake rpcgen glib2-devel gnutls-devel libxml2-devel libtirpc-devel yajl-devel librbd-devel pixman-devel python3-docutils libxslt-devel
    pip3 --trusted-host files.pythonhosted.org install meson
  2. Compile the Ninja source code.

    The Ninja version must be 1.10.2. Here, ninja-1.10.2.tar.gz is used as an example.

    Download ninja-1.10.2.tar.gz from https://github.com/ninja-build/ninja/archive/refs/tags/v1.10.2.tar.gz.

    tar -xzvf ninja-1.10.2.tar.gz
    cd ninja-1.10.2 && ./configure.py --bootstrap
    cmake -Bbuild-cmake -H.
    cmake --build build-cmake
    cd /usr/bin 
    ln -s /root/src/ninja-1.10.2/build-cmake/ninja ninja
    # Check whether the Ninja installation is successful.
    which ninja
    • For libvirt-6.9.0 source code compilation, the Meson version must be 0.58 or later.
    • When creating a soft link, replace the absolute path of the Ninja executable file based on your requirements.