Page tree
Skip to end of metadata
Go to start of metadata

原文:https://apt.kitware.com/

ROS Kinetic自带的CMake版本为3.5.1,但是目前一些较新的开源项目要求更高版本的CMake才能够编译,而Ubuntu 16.04官方的apt仓库无法更新CMake,因此需要使用Kitware的官方仓库来更新CMake版本!

以下命令均在ROS Kinetic容器中执行!

Step-1 安装依赖包

apt-get update
apt-get install apt-transport-https wget

Step-2 获取签名密钥

wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null

Step-3 添加Kitware仓库至源列表,然后更新

echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
apt-get update

Step-4 安装kitware-archive-keyring软件包,确保keyring保持最新

rm /usr/share/keyrings/kitware-archive-keyring.gpg
apt-get install kitware-archive-keyring

Step-5 更新CMake

apt-get install cmake
Write a comment...