Cmake has not updated, what I am doing wrong?

5,100

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.

Share:
5,100

Related videos on Youtube

S.EB
Author by

S.EB

Updated on September 18, 2022

Comments

  • S.EB
    S.EB over 1 year

    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
      N0rbert almost 6 years
      Please add output of which cmake and apt-cache policy cmake to the question.
    • Knud Larsen
      Knud Larsen almost 6 years
      Installing a new version manually has nothing to do with apt : The "Package data base" has no information about manual installs, only knows about [packages.deb]. .... Your previous question 2 days ago about the same → askubuntu.com/questions/1045044/…
    • S.EB
      S.EB almost 6 years
      @N0rbert I updated the question
    • muru
      muru almost 6 years
      The tags say 12.04, 14.04, apt-cache's output indicates 16.04. Is this Schrodinger's Ubuntu?
    • S.EB
      S.EB almost 6 years
      @muru sorry I am not expert and do not know what do you mean about Schrodinger's Ubuntu ? If you mean about ubuntu version, it is ubuntu 16.04 and I have installed from official website.
    • S.EB
      S.EB almost 6 years
      @KnudLarsen Thanks for your comment, however, i could not resolve my issue.
    • Knud Larsen
      Knud Larsen almost 6 years
      @S.EB : Please read my answer here askubuntu.com/questions/1045044/…
    • N0rbert
      N0rbert almost 6 years
      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.
    • S.EB
      S.EB almost 6 years
      @N0rbert Thanks for your patience and help
    • S.EB
      S.EB almost 6 years
      @KnudLarsen Thank you very much for your help and patience