Installation of cmake without admin permission

7,101 views
Skip to first unread message

Philipp Siehr

unread,
Sep 3, 2013, 6:16:58 AM9/3/13
to dea...@googlegroups.com
Hello everyone,


I want to use the new deal.II version 8.0.0 but I can't install it, because the current version of cmake is 2.8.7.
The deal installation needs cmake version 2.8.8. So obviously I need to install a newer version of cmake.
But that is the problem, because I don't have admin permission on this computer.


I tried the following instruction: http://www.cmake.org/cmake/help/install.html
The first two steps 1) "./bootstrap" or "cmake ."   and 2)  "make" worked well.
The third optional (?) step "make install" does need admin permissions:
-- Install configuration: ""
CMake Error at cmake_install.cmake:36 (FILE):
  file cannot create directory: /usr/local/doc/cmake-2.8.  Maybe need
  administrative privileges.
make: *** [install] Fehler 1



Any ideas how to install cmake without admin permissions ?


System: Ubuntu 12.04.2 LTS


Best regards,
Philipp

Felix Gruber

unread,
Sep 3, 2013, 7:50:51 AM9/3/13
to dea...@googlegroups.com
Hello Philipp,


Am Dienstag, 3. September 2013 12:16:58 UTC+2 schrieb Philipp Siehr:
Any ideas how to install cmake without admin permissions ?


You can install cmake under your home directory. To this end you simply need to run the bootstrap script as follows:

./bootstrap --prefix=$HOME

You may need to add $HOME/bin to your PATH, otherwise your shell might not find your newly installed CMake. This can be done by adding

PATH=$HOME/bin:$PATH

to your .bashrc (assuming you use the Bash shell).

Best,
Felix

bruno.t...@gmail.com

unread,
Sep 3, 2013, 10:20:55 AM9/3/13
to dea...@googlegroups.com
Hello Philipp,


Any ideas how to install cmake without admin permissions ?


System: Ubuntu 12.04.2 LTS

you can download the binary Linux i386 from http://www.cmake.org/cmake/resources/software.html and then just add to you .bashrc something like:

export PATH=/path_to_cmake/bin:$PATH

Best

Bruno

Philipp Siehr

unread,
Sep 5, 2013, 10:36:45 AM9/5/13
to dea...@googlegroups.com
Hello Bruno,
hello Felix,

thank you for your advice.

I am not experienced with the bash and I think something went wrong at this point.
Both "./bootstrap --prefix=$HOME" + "make install" or downloading the binary files worked so far.
With both ways I have a "path/bin" folder with the files of cmake.


I tried your entries for the .bash_rc:
Felix: PATH=$HOME/bin:$PATH
Bruno: export PATH=HOME/Programme/cmake-2.8.11.2-Linux-i386/bin:$PATH

I normally write it like that (because someone told me to do it that way):
PATH=$PATH:/$HOME/Programme/cmake-2.8.11.2-Linux-i386/bin
export PATH


Which version is correct / is there a difference?

After that I reloaded the bash with the command "exec bash".
All three versions result in the following output:
psiehr@sim07:~/Programme/deal.II_800/build$ cmake -DCMAKE_INSTALL_PREFIX=../../deal.II_800/  ../deal.II
CMake Error at CMakeLists.txt:34 (CMAKE_MINIMUM_REQUIRED):
  CMake 2.8.8 or higher is required.  You are running version 2.8.7
-- Configuring incomplete, errors occurred!


Any ideas where the error might be located?

Best,
Philipp



Bruno Turcksin

unread,
Sep 5, 2013, 10:53:10 AM9/5/13
to dea...@googlegroups.com
Philipp,



> I tried your entries for the .bash_rc:
> Felix: PATH=$HOME/bin:$PATH
> Bruno: export PATH=HOME/Programme/cmake-2.8.11.2-Linux-i386/bin:$PATH
>
> I normally write it like that (because someone told me to do it that
> way):
> PATH=$PATH:/$HOME/Programme/cmake-2.8.11.2-Linux-i386/bin
> export PATH
>
> Which version is correct / is there a difference?

They are all correct but it is usually better to put $PATH add the end.
The reason is the following: let say that in the default path of the
system, there is already a cmake, now in your path you have two cmake.
The default cmake will be used because it is the first to appear in the
path. If you put $PATH at the end, then the cmake that you have install
will be chosen.
>
> After that I reloaded the bash with the command "exec bash".
> All three versions result in the following output:
> psiehr@sim07:~/Programme/deal.II_800/build$ cmake
> -DCMAKE_INSTALL_PREFIX=../../deal.II_800/ ../deal.II
> CMake Error at CMakeLists.txt:34 (CMAKE_MINIMUM_REQUIRED):
> CMake 2.8.8 or higher is required. You are running version 2.8.7
> -- Configuring incomplete, errors occurred!
>
>
> Any ideas where the error might be located?

You should modify the path, then do "source ~/.bashrc" After that you
can do "cmake --version" to check that your system uses the right
version of cmake. The last thing to do is to delete the build directory
of deal.II and to try to compile deal.II. The reason why you want to
delete the directory is because cmake uses a cache file and it could be
that cmake just look at the cache file to find the cmake version that
you are using instead of trying to find the new cmake.

Best

Bruno
>
>
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/Z1QY0wxaxUw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


Philipp Siehr

unread,
Sep 6, 2013, 7:14:55 AM9/6/13
to dea...@googlegroups.com
Hello Bruno,

thank you for your help.
Everything is working very well and I have learned something new about the bash. :)

For the sake of completeness and if someone has the same problem:
The .bashrc has the following entry:
export PATH=~/Programme/cmake-2.8.11.2-Linux-i386/bin:$PATH

Best regards,
Philipp


Am Dienstag, 3. September 2013 12:16:58 UTC+2 schrieb Philipp Siehr:
Reply all
Reply to author
Forward
0 new messages