Problem with the Installing of VTK in Ubuntu

I am facing the following problem. Can Anyone please help? Thank you.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Error at CMake/FindPythonLibs.cmake:183 (FILE):
  FILE STRINGS file "/usr/include/python3.6/patchlevel.h" cannot be read.
Call Stack (most recent call first):
  CMake/vtkWrapPython.cmake:167 (find_package)
  Utilities/Python/CMakeLists.txt:4 (include)


CMake Error at CMake/FindPythonLibs.cmake:183 (FILE):
  FILE STRINGS file "/usr/include/python3.6/patchlevel.h" cannot be read.
Call Stack (most recent call first):
  CMake/vtkPythonWrapping.cmake:6 (find_package)
  Wrapping/PythonCore/CMakeLists.txt:2 (include)


CMake Warning at CMake/vtkPythonWrapping.cmake:14 (message):
  Python library .  mismatches python 3.10.
Call Stack (most recent call first):
  Wrapping/PythonCore/CMakeLists.txt:2 (include)


CMake Deprecation Warning at ThirdParty/verdict/vtkverdict/CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find LibPROJ (missing: LibPROJ_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  CMake/FindLibPROJ.cmake:43 (find_package_handle_standard_args)
  CMake/vtkModuleMacros.cmake:891 (find_package)
  ThirdParty/libproj/CMakeLists.txt:1 (vtk_module_third_party)


-- Configuring incomplete, errors occurred!
See also "/home/slm_lab/vtk/build/CMakeFiles/CMakeOutput.log".
See also "/home/slm_lab/vtk/build/CMakeFiles/CMakeError.log".

Did you try building Slicer to know if the same issue happens there?

It’s a side step but I hope it helps

1 Like

Please Install libproj-dev

1 Like

Well, the Python headers are also missing here.

1 Like

No I haven’t tried to build it by Slicer. May I know how to use it?

I have already installed it but the same things happening all the time.

Here ypu have:

https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html

1 Like

I am using the following steps to install LIGGGHTS. May I know where is the problem going on? When I am using "make auto ", I am getting the mentioned error.

sudo apt-get install ffmpeg
sudo apt install openmpi-bin
sudo apt install git
git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git

sudo apt install cmake libavcodec-dev libavformat-dev libavutil-dev libboost-dev
libdouble-conversion-dev libeigen3-dev libexpat1-dev libfontconfig-dev libfreetype6-dev
libgdal-dev libglew-dev libhdf5-dev libjpeg-dev libjsoncpp-dev liblz4-dev liblzma-dev
libnetcdf-dev libnetcdf-cxx-legacy-dev libogg-dev libpng-dev libpython3-dev
libqt5opengl5-dev libqt5x11extras5-dev libsqlite3-dev libswscale-dev libtheora-dev
libtiff-dev libxml2-dev libxt-dev qtbase5-dev qttools5-dev zlib1g-dev

cd ~/LIGGGHTS-PUBLIC/src
make auto
gedit MAKE/Makefile.user
USE_VTK is set to “ON”
AUTOINSTALL_VTK = "ON"
make auto
sudo ln -s ~/LIGGGHTS-PUBLIC/src/lmp_auto /bin/lmp380
lmp380

Looking for some cordial help. Thank you.

Can you please tell me what is going on now?

slm_lab@slmlab-VirtualBox:~/LIGGGHTS-PUBLIC/src$ make auto
Creating list of contact models completed.
make[1]: Entering directory '/home/slm_lab/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:945: *** 'Could not determine suitable appendix of VTK library with VTK_INC="-I../../lib/vtk/install/include/vtk-8.0", VTK_LIB="-L/home/liggghts/vtk/lib" and VTK_APPENDIX="-8.0"'.  Stop.
make[1]: Leaving directory '/home/slm_lab/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2

Probably you should check your dirdtotires