Installation Geant4 on MobaXterm

Hi experts!
I am trying to install Geant4 on MobaXterm… When I run
~/geant4-v11.2.2-build# cmake -DCMAKE_INSTALL_PREFIX=~/geant4-v11.2.2-install/ -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON …/geant4-v11.2.2

I have recieve error message:

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindEXPAT.cmake:65 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/Modules/G4OptionalComponents.cmake:69 (find_package)
cmake/Modules/G4CMakeMain.cmake:59 (include)
CMakeLists.txt:49 (include)
– Configuring incomplete, errors occurred!
See also “/root/geant4-v11.2.2-build/CMakeFiles/CMakeOutput.log”.
See also “/root/geant4-v11.2.2-build/CMakeFiles/CMakeError.log”.

Geant4 Version:
Operating System:
Compiler/Version:

CMake Version:


I’m not familiar with MobaXterm, but the about error means that whatever system it’s running on doesn’t have the expat library or headers. You could set -DGEANT4_USE_SYSTEM_EXPAT=OFF, but it’s going to be better long term to instal/use the system version.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.