yum installs an old version of cmake

You don't say but what versions are you getting and what versions do you expect?

What repositories do I have?

You can find out what repositories your system is configured to query using this command:

$ yum repolist | expand
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: centos.mirror.constant.com
 * epel: mirror.steadfast.net
 * extras: mirror.symnds.com
 * updates: bay.uchicago.edu
77 packages excluded due to repository priority protections
repo id         repo name                                               status
base            CentOS-6 - Base                                         6,297+70
epel            Extra Packages for Enterprise Linux 6 - x86_64            10,246
extras          CentOS-6 - Extras                                            7+7
updates         CentOS-6 - Updates                                           314
repolist: 16,864

Package info

You can query any package whether it's installed or not using yum info <pkg>.

$ yum info cmake
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: centos.mirror.constant.com
 * epel: mirror.steadfast.net
 * extras: mirror.symnds.com
 * updates: bay.uchicago.edu
77 packages excluded due to repository priority protections
Installed Packages
Name        : cmake
Arch        : x86_64
Version     : 2.6.4
Release     : 5.el6
Size        : 18 M
Repo        : installed
From repo   : base
Summary     : Cross-platform make system
URL         : http://www.cmake.org
License     : BSD
Description : CMake is used to control the software compilation process using simple
            : platform and compiler independent configuration files. CMake generates
            : native makefiles and workspaces that can be used in the compiler
            : environment of your choice. CMake is quite sophisticated: it is possible
            : to support complex environments requiring system configuration, pre-processor
            : generation, code generation, and template instantiation.

Package's URL

You can find out where a RPM is being downloaded from using the repoquery command.

$ repoquery --location cmake
http://centos.mirrors.hoobly.com/6.5/os/x86_64/Packages/cmake-2.6.4-5.el6.x86_64.rpm

Which is part of this repository:

$ repoquery -i cmake | grep Repos
Repository  : base

So this is a base repository to the CentOS distro that's providing this package.

What other repositories have it?

You can query what repositories contain a specific package (at least most of the major repos) using pkgs.org.

  • http://pkgs.org/search/?query=cmake&type=smart

According to this list the EPEL repo has the latest version pre-built. The version of this package is as follows: cmake 28-2.8.11.2-1.


I needed cmake 2.8 on CentOS 6.5, but my attempts at using yum would also always keep cmake at 2.6 even though I tried adding repos that seemingly contained the correct version. It's kind of hacky, but I was able to get what I needed by executing the following commands as root:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6.8.noarch.rpm
yum install cmake28
cd /usr/bin
mv cmake cmake26
mv ccmake ccmake26
mv cpack cpack26
mv ctest ctest26
ln -s cmake28 cmake
ln -s ccmake28 ccmake
ln -s cpack28 cpack
ln -s ctest28 ctest