I am trying to upgrade cmake on my linux computer. Here is the command I used.
Remove the old cmake:
sudo apt purge --auto-remove cmake
Download and extracted cmake-3.13.3.tar.gz from https://cmake.org/download/
Then in the extracted cmake folder:
./bootstrap
make
sudo make install
when I did cmake --version
it returns
bash: /usr/bin/cmake: No such file or directory
which indicates that no cmake executable exists in /usr/bin
. However when I run which cmake
it returns
/usr/local/bin/cmake
And that does exist.
How do I have the command cmake
point to /usr/local/bin/cmake
?
My $PATH
shows
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Edit: different from the other question since I know exactly where the cmake executable is just that --version
and which
have different effect.