【环境搭建】Ubuntu16 C++-1. CMake

时间:2024-04-01 21:05:20
  1. 下载软件包 下载地址

  2. 解压文件

  3. 检查依赖 ./bootstrap
    Q1:

    CMake Error at Utilities/cmcurl/CMakeLists.txt:647 (message): Could not find OpenSSL. Install an OpenSSL development package or configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL.

    Answer: 安装ssl sudo apt-get install libssl-dev
    Q2:

    Error when bootstrapping CMake: Cannot find appropriate C compiler on this system.

    Answer: 安装gcc,g++,make

    sudo apt install gcc
    sudo apt install g++
    sudo apt install make
    
  4. 编译 make -j8

  5. 安装 sudo make install