Results 1 to 6 of 6

Thread: Help installing cmake from source

  1. #1
    Join Date
    Nov 2008
    Location
    UK
    Beans
    91

    Help installing cmake from source

    cmake 2.8.7 is in Precise 12.04 repository, but I require 2.8.9 (or later).

    Downloaded source from http://www.cmake.org/cmake/resources/software.html and built from source as per the readme file:
    Code:
    ./bootstrap --prefix=/opt/cmake
    make
    sudo make install
    The build seemed to install OK, but when I run:
    Code:
    cmake
    I get:
    The program 'cmake' is currently not installed. You can install it by typing:
    sudo apt-get install cmake
    How do I get the system to recognize the install?

  2. #2
    Join Date
    Apr 2012
    Beans
    5,694

    Re: Help installing cmake from source

    Is it maybe just a matter of adding the /opt/cmake directory to your path?

    Code:
    $ export PATH=$PATH:/opt/cmake
    (or maybe /opt/cmake/bin if it puts the actual binary in a bin subdir)

  3. #3
    Join Date
    Nov 2008
    Location
    UK
    Beans
    91

    Re: Help installing cmake from source

    Ah! Thank you.
    Code:
    $ export PATH=$PATH:/opt/cmake/bin
    Fixed the problem.

    Perhaps I should have used checkinstall as recommended here:

    https://help.ubuntu.com/community/CompilingSoftware?

  4. #4
    Join Date
    Nov 2008
    Location
    UK
    Beans
    91

    Re: Help installing cmake from source

    Quote Originally Posted by heyup View Post
    Ah! Thank you.
    Code:
    $ export PATH=$PATH:/opt/cmake/bin
    Fixed the problem.
    But only temporarily. If I close terminal and open new terminal and run:
    Code:
    cmake
    I get same error message, cmake is not installed.

  5. #5
    Join Date
    Apr 2012
    Beans
    5,694

    Re: Help installing cmake from source

    Add the export to the bottom of your ~/.bashrc file; or to your ~/.profile if you need it to be set for other shells (that might be the case if you are going to call cmake from other build tools)

  6. #6
    Join Date
    Nov 2008
    Location
    UK
    Beans
    91

    Re: Help installing cmake from source

    OK. Thanks. I'll do that.

    Seems that setting the install to /opt/make is the cause of the problem. The default install is to /usr/local/bin which is in $PATH. When I tried to install with checkinstall to /opt/make I had the same problem.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •