Install the build environment and OpenGL graphics driver to prepare the GEANT4 for installation.
1. Install the basic compiling environment
sudo apt install build-essential
2. Install OpenGL Library
sudo apt install Libgl1-mesa-dev
3. Install OpenGL Utilities
sudo apt install Libglu1-mesa-dev
The OpenGL Utilities is a toolkit built on the OpenGL Library, providing a number of handy functions to make OpenGL more powerful and easier to use.
4, install sudo apt install Libxt-dev
This package is not loaded when compiling geant4, the Error:x11/intrinsic.h:no such file or directory error is reported.
5, open the new Package Manager, find LIBXMU. Put all seven found. Otherwise, you will encounter the following error when compiling GEANT4: Include/g4openglxviewer.hh:46:29:error:x11/xmu/stdcmap.h:no such file or directory
The reason may be that the LIBXMU-related packages that are installed by default are not dev editions (develop), so there is no header file in the system.