Ubuntu: software update (cmake) - version value (local compiler)

I had cmake 2.8.0 installed on my machine (from ubuntu packages), the binary was placed in / usr / bin / cmake. I need to update my cmake version to at least 2.8.2. The ubuntu version is quite old, but I can't update it right now, so I have to install it from sources. I downloaded cmake 2.8.2 and then instructions and did make install

with root privileges. Now I have two parallel cmakes installed on my machine:

  • / usr / bin / cmake - 2.8.0
  • / usr / local / bin / cmake - 2.8.2
any_user @ machine $ cmake --version
2.8.0

root @ machine $ cmake --version
2.8.2

What should I do to get rid of 2.8.0 (which is outdated for me now) or just replace 2.8.0 with 2.8.2? I would like to prevent any user from typing cmake

(without specifying a path) to get a newer version. Thanks in advance.

+3


source to share


2 answers


These steps are commonly used (basically for any custom build application):

First check if the new cmake build works by using it from your build location.

When you confirm that it works, you correctly uninstall the Ubuntu version using:



apt-get remove cmake

      

Finally, install the new cmake using the command make install

.

In our case, when you've already installed a custom build version, you may need to reinstall cmake after uninstalling the Ubuntu package to prevent the cmake process from crashing due to the uninstall process.

+3


source


You must use checkinstall to install your package. It creates a package that you can install on your system. This way, the files you install are handled by the package manager and can be easily removed.
I think the old package will be removed automatically when you give the package you create a newer version (I'm not sure here).



+2


source







All Articles