Are you a physics student and you need to install this marvellous, poorly documented, complex program? You are crashing your head against a fucking wall because whenever you compile it from source it gives you that dreadful segmentation error?
Look no further! You can install it in 4 simple steps, if you are lucky enough to run a debian-ish distro!
- Step one:
Install the required Geant4 dependencies:
sudo apt-get install libboost-all-dev libmpfr4 libmpfr-dev liblzma-dev libsqlite3-dev
- Step two:
Add the Geant4 repositories (yes, they exist!) to your sources:
echo "deb http://lcg-heppkg.web.cern.ch/lcg-heppkg/ debian stable hep" >> /etc/apt/sources.list.d/geant4.list echo "deb-src http://lcg-heppkg.web.cern.ch/lcg-heppkg/ debian stable hep" >> /etc/apt/sources.list.d/geant4.list
- Step three:
Update the system and install Geant4:
sudo apt-get update && sudo apt-get install cern-archive-keyring sudo apt-get update && sudo apt-get install geant4
- Step four:
Setup the environment:
cd echo "export G4ENV_VERBOSITY=silent" >> .bashrc echo "source /usr/share/geant4/env.sh" >> .bashrc echo "export LD_LIBRARY_PATH=/usr/lib:/usr/lib64:\$LD_LIBRARY_PATH:/usr/local/lib" >> .bashrc echo "export PATH=/usr/local/bin:\$PATH" >> .bashrc source .bashrc
And yup, it’s all done. Thanks for reading. Ask for questions if you need to!