Centos7 编译安装 CMake 3.16.2

CentOS 7 源码安装 CMake 3.16.2 最新稳定版。解决 cmake: command not found 问题。 1、准备编译环境 yum -y install gcc gcc-c++ openssl openssl-devel tar 2、获取源码,并解压 wget https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz tar -zxf cmake-3.16.2.tar.gz cd cmake-3.16.2 备用下载地址:https://down.24kplus.com/linux/cmake/cmake-3.16.2.tar.gz 3、编译安装 ./bootstrap --prefix=/usr --datadir=share/cmake --docdir=doc/cmake && make sudo make install 4、检查是否正确安装 cmake --version cmake version 3.16.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). 参考 https://www.24kplus.com/linux/1598.html

2025 年 11 月 14 日 · 阅读时长 1 分钟 · 共 160 字 · DeleyNomore

Centos7 编译安装 libzip 1 8 0

CentOS 7 源码安装 libzip 1.8.0,解决 error: Please reinstall the libzip distributio 或 error: system libzip must be upgraded to version >= 0.11 错误。 1、准备编译环境 yum install openssl-devel bzip2 bzip2-devel 2、下载源码,并解压 wget https://libzip.org/download/libzip-1.8.0.tar.gz --no-check-certificate \ && tar -zxf libzip-1.8.0.tar.gz \ && cd libzip-1.8.0 备用下载地址:https://down.24kplus.com/linux/libzip/libzip-1.8.0.tar.gz 3、编译安装 mkdir build && cd build \ && cmake -DCMAKE_INSTALL_PREFIX=/usr .. \ && make \ && sudo make install 如果提示 cmake: command not found,需要先安装 cmake。 ...

2025 年 11 月 14 日 · 阅读时长 1 分钟 · 共 185 字 · DeleyNomore