First I installed the version of cmake from the repos:
sudo apt-get install cmake
Then I discovered that I need feature of cmake that is not in the older version, so I unstalled cmake:
sudo apt-get remove cmake
And installed from source:
wget http://www.cmake.org/files/v3.3/cmake-3.3.2.tar.gz tar -xzf cmake-3.3.2.tar.gz cd cmake-3.3.2/ ./configure make sudo make install
sudo cmake . correctly generates a makefile.
cmake . genereates an error:
bash: /usr/bin/cmake: No such file or directory
reinstalling the repository version and comparing the output of:
cmake --version sudo cmake --version
indicates that the from-source version is being run when
sudo is invoked, and the repository version is being run when it is not.
What is going on here?
I checked that
/usr/bin, but I'm not sure where else to look.