【解决】Missing FindPython3.cmake

清泛编译
编译llvm时,报错:
CMake Error at CMakeLists.txt:729 (find_package):
  By not providing "FindPython3.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Python3", but
  CMake did not find one.

  Could not find a package configuration file provided by "Python3"
  (requested version 3.6) with any of the following names:

    Python3Config.cmake
    python3-config.cmake

  Add the installation prefix of "Python3" to CMAKE_PREFIX_PATH or set
  "Python3_DIR" to a directory containing one of the above files.  If
  "Python3" provides a separate development package or SDK, be sure it has
  been installed.
解决:cmake版本必须 >= 3.12
参考:https://gitlab.inria.fr/flowvr/flowvr-ex/-/issues/8

cmake升级方法:
1、访问:https://cmake.org/files/,下载最新版 cmake-3.xx.x-Linux-x86_64
2、解压 tar -zxvf cmake-3.xx.x-Linux-x86_64
3、mv cmake-3.xx.x-Linux-x86_64 /opt/cmake-3.xx.x
     ln -sf /opt/cmake-3.xx.x/bin/*  /usr/bin/
4、检查版本: cmake --version
参考:https://m.linuxidc.com/Linux/2018-09/154165.htm

cmake

分享到:
评论加载中,请稍后...
创APP如搭积木 - 创意无限,梦想即时!
回到顶部