14

So I uninstalled cmake, and reinstalled it with an updated version, and the path is correct, and the file is there, but whenever I try to run cmake, bash echoes -bash: /usr/bin/cmake: No such file or directory

pi@raspberrypi /usr/local/bin $ dir
cmake  cpack  ctest  indiecity

pi@raspberrypi /usr/local/bin $ export | grep PATH
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"

1 Answer 1

33

You need to type hash -r to rebuild the shell's command hash table.  It still "remembers" having found cmake in /usr/bin, so it just goes there, rather than searching through the search path again.

Or you could start a new shell.  Or logout and login again, or reboot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .