MyTechValley - How to install - Geant4 in Ubuntu
How to install - Geant4 In Ubuntu
You must have internet connection during geant4 installation. I recommend that you should install CERN root before installing Geant4.
From steps 1 to 28 are prerequisite of Geant4.
CERN ROOT

  • Step:1sudo apt-get -y install build-essential
  • Step:2sudo apt-get -y install libgl1-mesa-dev
  • Step:3sudo apt-get -y install libglu1-mesa-dev
  • Step:4sudo apt-get -y install libxt-dev
  • Step:5sudo apt-get -y install libxmu-headers
  • Step:6sudo apt-get -y install libxmuu1-dbg
  • Step:7sudo apt-get -y install libxmuu-dev
  • Step:8sudo apt-get -y install libxmu-dev
  • Step:9sudo apt-get -y install libxmu6-dbg
  • Step:10sudo apt-get -y install libxpm4-dbg
  • Step:11sudo apt-get -y install xpmutils
  • Step:12sudo apt-get -y install jwm
  • Step:13sudo apt-get -y install libxerces-c2-dev
  • Step:14sudo apt-get -y install libxi6-dbg
  • Step:15sudo apt-get -y install libxi-dev
  • Step:16sudo apt-get -y install openjdk-7-jdk
  • Step:17 echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64" >> $HOME/.bashrc
  • Step:18echo "export JDK_HOME=\$JAVA_HOME" >> $HOME/.bashrc
  • Step:19echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> $HOME/.bashrc
  • Step:20 echo "export CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar" >> $HOME/.bashrc
  • Step:21cd ~
  • Step:22wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
  • Step:23tar xf cmake-3.5.2.tar.gz
  • Step:24cd cmake-3.5.2
  • Step:25./configure
  • Step:26make
  • Step:27sudo apt-get install checkinstall
  • Step:28sudo checkinstall
  • Step:29cd ~
  • Step:30mkdir geant4
  • Step:31cd geant4
  • Step:32wget http://geant4.cern.ch/support/source/geant4_10_02_p01.zip
  • Step:33unzip geant4_10_02_p01.zip
  • Step:34mkdir geant4.10.2-build
  • Step:35cd geant4.10.2-build
  • Step:36cmake -DCMAKE_INSTALL_PREFIX=../geant4.10.2-install ../geant4_10_02_p01
  • Step:37cmake -DGEANT4_INSTALL_DATA=ON .
  • Step:38cmake -DGEANT4_USE_GDML=ON .
  • Step:39cmake -DGEANT4_USE_QT=ON .
  • Step:40cmake -DGEANT4_USE_OPENGL_X11=ON .
  • Step:41make
  • Step:42make install
  • Step:43 echo "source $HOME/geant4/geant4.10.2-install/bin/geant4.sh" >> $HOME/.bashrc
  • Step:44source $HOME/.bashrc

If you are facing any problem in installing Geant4 then let me know; I will be happy to assist you. My email id:info@mytechvalley.com

© All Rights reserved. Design by mytechvalley.com