问题现象
编译Faiss 1.7.4时,出现报错信息,提示“CMake 3.23.1 or higher is required.”。
问题原因
当前CMake的版本过低,Faiss1.7.4需要配套CMake3.23.1及以上版本。
解决方案
安装CMake3.23.1或以上版本。以安装CMake3.23.1版本为例:
- x86环境:
- 获取CMake安装脚本。
| wget https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-x86_64.sh
|
- 运行安装脚本。
bash ./cmake-3.23.1-linux-x86_64.sh --skip-licence --prefix=/usr
| # 安装过程中遇到:
# 选择1
Do you accept the license? [yn]:
# 输入 y
# 选择2
By default the CMake will be installed in:
"/usr/cmake-3.23.1-linux-x86_64"
Do you want to include the subdirectory cmake-3.23.1-linux-x86_64?
Saying no will install in: "/usr" [Yn]:
# 输入 n
|
- 查看CMake版本。
显示当前的CMake版本:
- aarch64环境:
- 获取CMake安装脚本。
| wget https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-aarch64.sh
|
- 运行安装脚本。
bash ./cmake-3.23.1-linux-aarch64.sh --skip-licence --prefix=/usr
| # 安装过程中遇到:
# 选择1
Do you accept the license? [yn]:
# 输入 y
# 选择2
By default the CMake will be installed in:
"/usr/cmake-3.23.1-linux-aarch64"
Do you want to include the subdirectory cmake-3.23.1-linux-aarch64?
Saying no will install in: "/usr" [Yn]:
# 输入 n
|
- 查看CMake版本。
显示当前的CMake版本: