Jetson TX2上升级cmake方法

我的应用场景要编译TensorRT的sampleuffMaskRCNN,需要最低cmake版本为3.13,而Jetpack 4.3刷机后自带的为3.12.
使用以下两条命令都是失败

sudo pip3 install cmake==3.13
sudo apt-get install python3-cmake

只能从源码安装

从源码安装camke

1. 删除默认的cmake

sudo apt remove cmake
sudo apt purge --auto-remove cmake

2. 从官网下载所需版本,解压,创建build文件夹

    version=3.13
    build=3
    mkdir ~/temp
    cd ~/temp
    wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
    tar -xzvf cmake-$version.$build.tar.gz
    cd cmake-$version.$build/

3. 编译安装

    ./bootstrap
    make -j4
    sudo make install

4. 移动路径

sudo cp ./bin/cmake /usr/bin/

5.验证安装结果

cmake --version

输出:

cmake version 3.13.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).

你可能感兴趣的:(Jetson,TX2)