在cmake編譯階段失敗,錯誤如下:
[WARNING] CMake Error at CMakeLists.txt:23 (cmake_minimum_required):
[WARNING] CMake 3.1 or higher is required. You are running version 2.8.12.2
需要更新 CMake !
那麼,我們先解除安裝已有的cmake
yum remove cmake
直接下載下傳二進制檔案包,安裝
cd /usr/tmp
wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz
tar zxvf cmake-3.10.2-Linux-x86_64.tar.gz
cd cmake-3.10.2-Linux-x86_64
目前最新為 v3.19.2, 我沒有使用最新版.
二進制檔案包,安裝,需要這樣安裝
你可以直接建立一個檔案執行 以下指令, 也可以直接執行
vim install
輸入待執行指令
#!/bin/bash
cp -r bin/* /usr/bin/
cp -r doc/* /usr/doc/
cp -r man/* /usr/local/man/
cp -r share/* /usr/share/
然後,執行
sh install
測試
[root@wsvr cmake-3.10.2-Linux-x86_64]# make -version
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
OK, 安裝好了,收工.
--- auth:lzpong