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.
which cmake
andapt-cache policy cmake
to the question. – N0rbert Jun 11 '18 at 18:58apt
: The "Package data base" has no information about manual installs, only knows about [packages.deb]. .... Your previous question 2 days ago about the same → https://askubuntu.com/questions/1045044/after-upgrading-the-cmake-i-am-still-getting-error-for-installing-the-itk#comment1704137_1045044 – Knud Larsen Jun 11 '18 at 21:02Schrodinger's Ubuntu
? If you mean about ubuntu version, it is ubuntu 16.04 and I have installed from official website. – S.EB Jun 12 '18 at 05:18cmake
is located in /usr/local/bin/cmake and that is the problem. Remove it withsudo rm /usr/local/bin/cmake
and try again. – N0rbert Jun 12 '18 at 11:11