sudo pip install --upgrade cmake==3.22.1
更新后使用 cmake --version查看版本,如果出现以下问题
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.10
cmake version 3.10.2
则使用
hash -r