Reputation: 1
I made a change in a shell script to use a version of cmake and can't find this script. I want to use cmake-3.18.5, I have installed it and changed the path to it in bashrc, but it still uses the older version cmake-3.18.2. How to find where this happens?
Upvotes: 0
Views: 2544
Reputation: 1882
You're problem appears to be that you put the filename in your path, not the directory.
First, try this at the command line to make sure cmake
is installed:
/HOME/cmake-3.18.5/bin/cmake --version
Then if that works, change your path on the command line:
export PATH=/HOME/cmake-3.18.5/bin:$PATH
Note that PATH
takes directories, not files or executables.
Now type
type -aP cmake
Make sure the right directory shows up (/HOME/cmake-3.18.5/bin/cmake
)
Now put this path command in your .bashrc
file and see if it works this time.
Upvotes: 1