Cmake error while installing Geant4

Dear Experts, I am getting this error. PLease help.


mihir@ROG-Strix:~/Desktop/G4/Geant4/geant4.10.07-build$ cmake -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_GDML=ON -DGEANT4_INSTALL_EXAMPLES=ON .
CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Failed to find XercesC (missing: XercesC_VERSION)
Call Stack (most recent call first):
/usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.14/Modules/FindXercesC.cmake:99 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/Modules/G4OptionalComponents.cmake:203 (find_package)
cmake/Modules/G4CMakeMain.cmake:59 (include)
CMakeLists.txt:51 (include)

– Configuring incomplete, errors occurred!
See also “/home/mihir/Desktop/G4/Geant4/geant4.10.07-build/CMakeFiles/CMakeOutput.log”.
See also “/home/mihir/Desktop/G4/Geant4/geant4.10.07-build/CMakeFiles/CMakeError.log”.


thank you.

1 Like

The system is missing an install of the Xerces-C headers and libraries. Check to see which packages the system provides XercesC through and install them before reconfiguring Geant4.

I am getting this.


mihir@ROG-Strix:~/Desktop/G4/Geant4/geant4.10.07-build$ sudo apt install Xerces-c++
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libxerces-c3-dev’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c3-doc’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c3.2’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c2-dev’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c3-samples’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c-dev’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c-doc’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c-samples’ for regex ‘Xerces-c+’
Note, selecting ‘libxerces-c-dev’ instead of ‘libxerces-c3-dev’
Note, selecting ‘libxerces-c-doc’ instead of ‘libxerces-c3-doc’
Note, selecting ‘libxerces-c-samples’ instead of ‘libxerces-c3-samples’
libxerces-c-doc is already the newest version (3.2.0+debian-2).
libxerces-c-samples is already the newest version (3.2.0+debian-2).
libxerces-c3.2 is already the newest version (3.2.0+debian-2).
The following packages were automatically installed and are no longer required:
linux-headers-5.4.0-96-generic linux-hwe-5.4-headers-5.4.0-96 linux-image-5.4.0-96-generic linux-modules-5.4.0-96-generic linux-modules-extra-5.4.0-96-generic
Use ‘sudo apt autoremove’ to remove them.
Suggested packages:
icu-doc
The following NEW packages will be installed:
icu-devtools libicu-dev libicu63 libxerces-c-dev
0 upgraded, 4 newly installed, 0 to remove and 78 not upgraded.
Need to get 1,627 kB/19.2 MB of archives.
After this operation, 92.5 MB of additional disk space will be used.
Err:1 Index of /ubuntu/ bionic/universe amd64 libxerces-c-dev amd64 3.2.0+debian-2
Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:3:1::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (43.255.166.254), connection timed out
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/x/xerces-c/libxerces-c-dev_3.2.0+debian-2_amd64.deb Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:3:1::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (43.255.166.254), connection timed out
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Is the machine connected to the internet?

Yes, I have good internet connectivity.

All I can suggest is to keep trying, if it continues to fail you’ll need to check with the network provider and/or Ubuntu.

I think the Index of /ubuntu/ website is not working right now. is this XercesC package available on GitHub or somewhere else?