1

I am trying to upgrade cmake on my linux computer. Here is the command I used

sudo apt purge --auto-remove cmake

After downloading and extracted cmake-3.13.3.tar.gz

./bootstrap
make 
sudo make install 

when I did cmake --version it returns

bash: /usr/bin/cmake: No such file or directory

However no cmake executable exists in /usr/bin and strangely which cmake returns

/usr/local/bin/cmake

which is where cmake actually is.

My $path is

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

How do I have the command cmake point to /usr/local/bin/cmake?

kkawabat
  • 111
  • 2
  • 5
  • 2
    If `/usr/bin/cmake` was removed only recently, then it's possible your current shell has hashed the old value. See [Pytest is in PATH but not found](https://askubuntu.com/questions/861376/pytest-is-in-path-but-not-found/861386#861386) for a similar case. – steeldriver Jan 29 '19 at 22:37
  • Thank you so much that fixed it. If you want to make this the answer i will accept it. – kkawabat Jan 29 '19 at 23:01
  • sudo ln -s /usr/local/bin/cmake /usr/bin/ – Frost Xu Apr 24 '20 at 09:28

0 Answers0