Ubuntu(WSL2) 安装最新版的 cmake

Ubuntu(WSL) 安装最新版的 cmake 具体流程如下:

步骤一:卸载原本的 cmake

sudo apt-get remove cmake

步骤二:

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget

步骤三:

wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -

步骤四:更新仓库

sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update

步骤五:安装 cmake

sudo apt-get install cmake

步骤六:

make -v

你可能感兴趣的:(Linux,操作系统,ubuntu,linux,运维)