[Linux] Install CMake on Jetson Nano

[Linux] Install CMake on Jetson Nano

Given that JetsonNano belongs to the arm64 platform, many tools have unexpected problems. This article aims to share the process of installing CMake from source code .

  • Prepare
    a JetsonNano, install g++ and gcc
    to uninstall the original CMake (if any)
    sudo apt remove cmake
    or find install_manifest.txt from the cmake installation directory, the installation directory of all cmake’s auxiliary files is saved in the txt, and all the files displayed in the txt remove tar
    sudo rm -rf /usr/local/share/cmake*

  • Download the source code (see the resources I uploaded)
    here is a pitfall: CLion remote debugging supports versions 2.8.11-3.16.x. If you use CLion to build a toolchain, you need to pay attention that the latest version 3.18 is not supported.
    https://cmake.org/download/

  • step by step installation

    1. Open the folder where the compressed package is located and unzip the package
      tar -xzvf cmake-3.18.0-rc1.tar.gz

    2. Open the unzipped folder
      cd cmake-3.18.0-rc1

    3. Run the command:
      ./configure

      [PS] There may be an error that OpenSSL cannot be found here. The solution is to edit the CMakeLists.txt file and add at the beginning of the file:
      set(CMAKE_USE_OPENSSL OFF)

    4. run command
      make

    5. run command
      sudo make install

      The installation is complete here.

  • Verify installation
    a) Check CMake version:
    cmake --version

    b) Check the compiler path:
    sudo cmake ../

Given that JetsonNano belongs to the arm64 platform, many tools have unexpected problems. This article aims to share the process of installing CMake from source code .

  • Prepare
    a JetsonNano, install g++ and gcc
    to uninstall the original CMake (if any)
    sudo apt remove cmake
    or find install_manifest.txt from the cmake installation directory, the installation directory of all cmake’s auxiliary files is saved in the txt, and all the files displayed in the txt remove tar
    sudo rm -rf /usr/local/share/cmake*

  • Download the source code (see the resources I uploaded)
    here is a pitfall: CLion remote debugging supports versions 2.8.11-3.16.x. If you use CLion to build a toolchain, you need to pay attention that the latest version 3.18 is not supported.
    https://cmake.org/download/

  • step by step installation

    1. Open the folder where the compressed package is located and unzip the package
      tar -xzvf cmake-3.18.0-rc1.tar.gz

    2. Open the unzipped folder
      cd cmake-3.18.0-rc1

    3. Run the command:
      ./configure

      [PS] There may be an error that OpenSSL cannot be found here. The solution is to edit the CMakeLists.txt file and add at the beginning of the file:
      set(CMAKE_USE_OPENSSL OFF)

    4. run command
      make

    5. run command
      sudo make install

      The installation is complete here.

  • Verify installation
    a) Check CMake version:
    cmake --version

    b) Check the compiler path:
    sudo cmake ../

Guess you like

Origin blog.csdn.net/weixin_45306341/article/details/127622643