Error while installing Geant4 in Ubuntu22.04

I get this error message while installing Geant4.10.07

me@hp:~/Softwares/Geant4/geant4.10.07/build$ cmake ..
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /usr/share/cmake-3.22/Modules/CMakeCXXInformation.cmake:89 (include):
  include could not find requested file:

    /home/me/Softwares/Geant4/geant4.10.07/cmake/Modules/G4MakeRules_cxx.cmake
Call Stack (most recent call first):
  CMakeLists.txt:33 (project)


-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:51 (include):
  include could not find requested file:

    G4CMakeMain


-- Configuring incomplete, errors occurred!
See also "/home/me/Softwares/Geant4/geant4.10.07/build/CMakeFiles/CMakeOutput.log".

I think you haven’t installed pre-packages for Geant4.

But the version 11.0 was installed withe success.
This error while installing version 10.07

Dear Sir,
I also have some problems when I installed the old Geant4 version. My mistakes are data downloading or pre-packages that weren’t suitable for Ubuntu version 22.04.
In my opinion, Ubuntu 20.04 is the best version. I never met any mistakes when installing Geant4 on this version.

That is a very weird error - could you double check that the file /home/me/Softwares/Geant4/geant4.10.07/cmake/Modules/G4MakeRules_cxx.cmake is physically present and that it is readable by user, group and world please?

this file /home/me/Softwares/Geant4/geant4.10.07/cmake/Modules/G4MakeRules_cxx.cmake
doesn’t exist

I get the same error also in ubuntu 20.04

please try the following command before configuring Geant4.
sudo apt-get install build-essential apt-file gcc g++ autoconf automake automake1.11 tcl8.6-dev tk8.6-dev libglu1-mesa-dev libgl1-mesa-dev libxt-dev libxmu-dev libglew-dev libglw1-mesa-dev gfortran inventor-dev libxaw7-dev freeglut3-dev libxerces-c-dev libxmltok1-dev qt5-default libxi-dev libclutter-gtk-1.0-0 cmake libxmlrpc-core-c3-dev tclxml tclxml-dev libexpat1-dev libgtk2.0-dev libxpm-dev x11proto-gl-dev x11proto-input-dev -y

That file should exist, so all I can suggest is deleting the /home/me/Softwares/Geant4/geant4.10.07 directory and redownload the source tarball from:

https://geant4.web.cern.ch/support/download_archive

and unpack it again. Something’s likely gone wrong at that stage rather than anything else.

Thank you the problem was solved by downloading the source code using:
wget -nc https://geant4-data.web.cern.ch/releases/geant4.10.07.p01.tar.gz

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