Hello everyone,
Today I was trying to install LIGGGHTS on Ubuntu24.04 (wsl2) following the video in "https://www.youtube.com/watch?v=C41XW4UWKts". However, the installation failed and the issues are as follows:
1. "Package 'libnetcdf-cxx-legacy-dev' has no installation candidate" and "Note, selecting 'libfreetype-dev' instead of 'libfreetype6-dev'"
I changed 'libfreetype6-dev' to 'libfreetype-dev' and totally ignored 'libnetcdf-cxx-legacy-dev'.
The related context in the command line interface is
"simon@Simon:~$ 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
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libfreetype-dev' instead of 'libfreetype6-dev'
Package libnetcdf-cxx-legacy-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libnetcdf-cxx-legacy-dev' has no installation candidate"
2. I changed the setting of "AUTOINSTALL_VTK" in Makefile.user from OFF to ON.
3. "Make auto" failed.
The context in the command line interface is
"simon@Simon:~/LIGGGHTS-PUBLIC/src$ make auto
Creating list of contact models completed.
make[1]: Entering directory '/home/simon/LIGGGHTS-PUBLIC/src/Obj_auto'
'Could not compile VTK example. As AUTOINSTALL_VTK is set to "ON". VTK will now be automatically downloaded to ../../lib'
Cloning into '../../lib/vtk/src'...
remote: Enumerating objects: 779747, done.
remote: Counting objects: 100% (2694/2694), done.
remote: Compressing objects: 100% (1152/1152), done.
remote: Total 779747 (delta 1602), reused 2498 (delta 1528), pack-reused 777053 (from 1)
Receiving objects: 100% (779747/779747), 303.98 MiB | 2.64 MiB/s, done.
Resolving deltas: 100% (599984/599984), done.
Updating files: 100% (26038/26038), done.
VTK has been downloaded and will be compiled now. This can take several minutes.
Makefile:808: *** 'Compilation of vtk failed. Please install it manually'. Stop.
make[1]: Leaving directory '/home/simon/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2"
Could someone help me to solve the installation problems?
Thanks very much!
Mishal | Thu, 02/26/2026 - 09:14
VTK issues
VTK is always the issue.
whenever I do a clean build of LIGGGHTS, VTK always gives issues. I somehow fix it in most cases but it takes forever and never remember what I did.
Try Ubuntu 20.04 instead, since that may be an easier platform to install. If that does not work, just switch of VTK support. There are several other ways to get your simulation rendered.