最新版ubuntu16.10下安装geant4.10.03.b01。
下载页:http://www.geant4.org/geant4/support/download_beta.shtml
1、安装基础环境
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libxt-dev libxmu-dev libxi-dev zlib1g-dev libgl2ps-dev libexpat1-dev libxerces-c-dev
2、安装CLHEP2.3.4.3
在根目录下建立softwares并进入
cd ~/softwares
tar zxvf clhep-2.3.4.3.tgz
mkdir build
cd build
cmake ../2.3.4.3/CLHEP
make
sudo make all install
3、安装geant4.10.03.b01
在softwares下建立geant4,并进入
cd ~/softwares/geant4
mkdir geant4.10.03.b01-build
tar zxvf geant4.10.03.b01.tar.gz
cd geant4.10.03.b01-build
cmake -DCMAKE_INSTALL_PREFIX=/home/cgx/软件/geant4/geant4.10.03.b01-install -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_BUILD_MULTITHREADED=ON /home/cgx/软件/geant4/geant4.10.03.b01
make -jN
make install
4、在bash上加上下列语句
gedit ~/.bashrc
source /home/cgx/软件/geant4/geant4.10.03.b01-install/bin/geant4.sh
source /home/cgx/软件/geant4/geant4.10.03.b01-install/share/Geant4-10.3.0/geant4make/geant4make.sh