Installing deal.ii on ubuntu

Asked by Antonio Meza on 2021-04-17

For installing deal.ii on ubuntu 20.04 I did the following:
sudo apt install libdeal.ii-dev
sudo apt install libdeal.ii-doc

I didn't know where the examples were located, then I used 'find' and found it is under /usr/share/doc/libdeal.ii-doc/examples
then, I cd to step-1 and I did
cmake .
make
make run

and I got a bunch of errors!

Perhaps there is something I'm missing. Was the installation correct?

Many thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu deal.ii Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:

This question was reopened

Bernard Stafford (bernard010) said : #1

You might install: libdeal.ii-9.1.1
https://packages.ubuntu.com/focal/libdeal.ii-9.1.1

Antonio Meza (cesarantoine) said : #2

Why should I install libdeal.ii-9.1.1? The last version is libdeal.ii-9.2.0.
But if I do 'sudo apt install libdeal.ii-9.2.0' I don't get anything

Because its not in the repositories for your release of Ubuntu. It's absolutely irrelevant what the latest version is.

Antonio Meza (cesarantoine) said : #4

Thanks Bernard Stafford, that solved my question.

Antonio Meza (cesarantoine) said : #5

When I do:
sudo apt install libdeal.ii-9.1.1
I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
libdeal.ii-9.1.1 is already the newest version (9.1.1-9build2).
libdeal.ii-9.1.1 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I don't understand, is it installed or not?

Manfred Hampl (m-hampl) said : #6

To check what's installed issue the command

dpkg -l | grep deal.ii

Did you read the readme file on /usr/share/doc/libdeal.ii-doc/html/readme.html and/or /usr/share/doc/libdeal.ii-doc/html/index.html

Antonio Meza (cesarantoine) said : #7

After using the command 'dpkg -l | grep deal.ii' I get:

libdeal.ii-9.1.1:amd64 9.1.1-9build2 amd64 Finite Element Differential Equations Analysis Library
libdeal.ii-dev 9.1.1-9build2 amd64 Differential Equations Analysis Library - development files
libdeal.ii-doc 9.1.1-9build2 all Differential Equations Analysis Library - html doc. and examples

Is the installation complete?
After reading the links you sent it says that I have to download and unpack the file, deal.II-X.Y.Z.tar.gz (deal.II-9.1.1.tar.gz), should I?

Manfred Hampl (m-hampl) said : #8

Your output shows that the packages available on Ubuntu focal are installed. No need for unpacking something any more.

If you now follow https://dealii.org/developer/doxygen/deal.II/step_1.html

with

cd step-1
cmake .
make
make run

What output do you receive?
Maybe you have not all required dependencies installed to run the examples.

Antonio Meza (cesarantoine) said : #9

after doing 'cmake .' I get:

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:173 (file):
  file failed to open for writing (No such file or directory):

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

CMake Error: Could not open file for write in copy operation /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:185 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

-- The C compiler identification is unknown
CMake Error: Could not open file for write in copy operation /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:212 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

CMake Error: Could not find cmake module file: /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CMakeCCompiler.cmake
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)

-- The CXX compiler identification is unknown
CMake Error: Could not open file for write in copy operation /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:210 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

CMake Error: Could not find cmake module file: /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake
-- Check for working C compiler: /usr/bin/cc
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:32 (file):
  file failed to open for writing (No such file or directory):

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeTmp/testCCompiler.c
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:44 (try_compile):
  Unknown extension ".c" for file

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeTmp/testCCompiler.c

  try_compile() works only for enabled languages. Currently these are:

    C CXX

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:56 (file):
  file failed to open for writing (No such file or directory):

    /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /usr/share/doc/libdeal.ii-doc/examples/step-1/CMakeCache.txt
CMake Error: : System Error: Permission denied
caesar@cesar:/usr/share/doc/libdeal.ii-doc/examples/step-1$

Best Manfred Hampl (m-hampl) said : #10

You should not try working in the system directory where the examples are stored, because you do not have write access to that area.

Try the following:
create work directory below your home directory
copy the contents of step-1 into that work directory or copy the whole step-1 directory there
cd to that directory and run the cmake... commands there.

Antonio Meza (cesarantoine) said : #11

Thanks Manfred Hampl, that solved my question.