0

I just have installed CMAKE in my ubuntu machine.. So when I do whereis cmake, it gives me the actual path

username@phx7b02c-ee1b:~/CMAKE/cmake-2.8.11$ whereis cmake
cmake: /usr/bin/cmake

But whenever I try to get the version of cmake, I always get the below message.. I am not sure what wrong I am doing here?

username@phx7b02c-ee1b:~/CMAKE/cmake-2.8.11$ /usr/bin/cmake --version
-bash: /usr/bin/cmake: is a directory

Can anyone help me here?

  • 1
    Hi, could you please detail the procedure you followed to install cmake? Is there a reason why you didn't use the existing package? (apt-get install cmake) Did you check whether /usr/bin/cmake/cmake is what you're looking for, which would indicate a badly configured installation, which will in turn be apparent when you detail how you installed it? – roadmr Oct 11 '13 at 20:12
  • @roadmr: I was following this wiki to do the installation of cmake.. I just changed the path to /usr/bin/cmake that's all – arsenal Oct 11 '13 at 20:17
  • Sorry, this is the full path I am supposed to use to make it working- /usr/bin/cmake/bin/cmake --versionBut is there any way such that I always use camke --version to see the version instead of using the full path everytime? – arsenal Oct 11 '13 at 20:21
3

The --prefix option is not where the binary file is. It's where all files are installed under. You need to rm -rf /usr/bin/cmake and just do sudo apt-get install cmake to install the cmake package on Ubuntu.

  • Thanks dobev for the suggestion.. Do you know what will be the path where cmake will get installed after doing this sudo apt-get install cmake ? – arsenal Oct 11 '13 at 20:25
  • If you install from a package it will most likely be in /usr/bin, meaning you can call it without an absolute path (i.e. just cmake). – roadmr Oct 11 '13 at 20:29
  • @roadmr: Thanks for suggestion.. Are you sure, if I am doing rm -rf /usr/bin/cmake then it won't cause any issue.. right? And then I can directly use sudo apt-get install cmake to install the cmake again? – arsenal Oct 11 '13 at 20:30
  • Yes. You installed it incorrectly, and the /usr/bin/cmake that exists and is a directory, is a result of that. – dobey Oct 11 '13 at 20:38
  • Yup.. I just tried it.. Now it works fine.. Thanks a lot.. I also have one more question somewhat related to apt get here.. Can you help me here? Pardon my ignorance.. This is my first time doing these things.. – arsenal Oct 11 '13 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.