4

I want to update my cmake to a specific version, but the version is not recognised. I am currently running 2.8.7 and want to upgrade to 2.8.11. (I also tried updating to the latest version, 3.3.1, but got the same result as below).

   cd /usr/bin
   sudo apt-get install cmake=2.8.11
[sudo] password: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version ‘2.8.11’ for ‘cmake’ was not found

I tried updating while in pwd=/usr/bin, following a previous suggestion, but it didn't help.

I suppose I can download from source, but I want to know what's wrong with my current approach.

(By the way, 2.8.11 is the minimum requirement to install the speedcrunch calculator >> https://bitbucket.org/heldercorreia/speedcrunch/ )

Community
  • 1
  • 1
yunque
  • 625
  • 1
  • 8
  • 18
  • 2
    Error message just tells, that there is no package with this exact version in the repository. The whole question is not related with programming, it is better ask it on `Super User`: http://superuser.com/. – Tsyvarev Sep 02 '15 at 11:25
  • Note that you can always download the CMake source package for the latest version and use your already installed, older CMake version to build the newer one. – ComicSansMS Sep 02 '15 at 11:58

4 Answers4

3

I assume that you have Ubuntu 12.04 LTS. Please try to add the following ppa and do the update like that:

sudo add-apt-repository ppa:smspillaz/cmake-2.8.12
sudo apt-get update
sudo apt-get install cmake

And check the version with:

cmake --version

Hope that helps.

jojeck
  • 935
  • 9
  • 29
  • Thanks, it works! I guess my version of Ubuntu wasn't supporting this version of cmake. For others with this problem... the PPA above provides a Ubuntu-12.04 friendly build of cmake 2.8.12 ;) – yunque Sep 02 '15 at 13:29
1

apt-cache show cmake will show you which versions are available for install on your system.

If the desired version is not available, check sites like packages.debian.org packages.ubuntu.org if the version is available in a newer version of your distro.

arved
  • 4,401
  • 4
  • 30
  • 53
  • Thanks for the tip. It seems I was already at the latest available version. I will keep this in mind for the future. – yunque Sep 02 '15 at 13:32
0

installation by a PPA (Upgrade to 3.2)

sudo apt-get install software-properties-common

sudo add-apt-repository ppa:george-edison55/cmake-3.x

sudo apt-get update

When cmake is not yet installed:

sudo apt-get install cmake

When cmake is already installed:

sudo apt-get upgrade

Community
  • 1
  • 1
zalamon
  • 1
  • 4
0

Download CMake from here

Add CMake in your environment, macos: PATH="/Applications/CMake.app/Contents/bin":"$PATH"

Check if CMake is correctly been installed:

cmake --version

https://questnr.com/post/brijeshlakkad_cmake-installati-module-is-a-2628938723241034495-63014

Brijesh Lakkad
  • 611
  • 10
  • 13