3

I uninstalled cmake by the following commands:

sudo apt remove cmake
sudo apt purge --auto-remove cmake

and then installed the new version from cmake website. When I ran cmake --version I am getting the version that I have installed:

cmake version 3.11.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

However, when again I am trying to run this command, it seems it still has the previous version

$ sudo apt-get install cmake
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cmake is already the newest version (3.5.1-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

I ran the following commands:

~$ which cmake
/usr/local/bin/cmake
~$ apt-cache policy cmake
cmake:
  Installed: 3.5.1-1ubuntu3
  Candidate: 3.5.1-1ubuntu3
  Version table:
 *** 3.5.1-1ubuntu3 500
        500 http://my.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.5.1-1ubuntu1 500
        500 http://my.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Could you please guide me? I cannot install a software that needs higher version of cmake.

N0rbert
  • 103,263
S.EB
  • 189

1 Answers1

3

The output of which cmake says that your cmake is located in /usr/local/bin/cmake and that is the problem.

Remove it with sudo rm /usr/local/bin/cmake and try again.

N0rbert
  • 103,263