Geant 4.7.0 was installed in two PCs with Scientific Linux 3 and CLHEP-1.9.1.2 (Config -build, Config -install, Config). No warnings or errors, installation successful. Two cases were tested: shared and static libraries. The novice examples were copied to the working directories of an XXuser and of root (/home/XXuser/geant4 and /root/geant4) and env.sh was sourced. The examples were compiled and linked with gmake. No error or warning. When we tried to run the executables we had the following messages: exampleN01: error while loading shared libraries: libG4run.so: cannot open shared object file: No such file or directory exampleN02: error while loading shared libraries: libG4visHepRep.so: cannot open shared object file: No such file or directory The libraries exist in $G4LIB/$G4SYSTEM.
It looks like you didn't add in PATH environment the path to your installed G4 libraries. The env.sh will not set ot for you. In next releases we probably will add this feature.
******************** Problem not solved **************************** [root@mozart Linux-g++]# echo $PATH /usr/sue/sbin:/usr/sue/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/apps/geant4.6.2.p02/lib/Linux-g++ [root@mozart N01]# gmake Making dependency for file exampleN01.cc ... Making dependency for file src/ExN01PrimaryGeneratorAction.cc ... Making dependency for file src/ExN01PhysicsList.cc ... Making dependency for file src/ExN01DetectorConstruction.cc ... Compiling ExN01DetectorConstruction.cc ... Compiling ExN01PhysicsList.cc ... Compiling ExN01PrimaryGeneratorAction.cc ... Creating/replacing object files in /root/geant4/tmp/Linux-g++/exampleN01/libexampleN01.a ... Compiling exampleN01.cc ... Using granular libraries ... Linking exampleN01 ... [root@mozart N01]# /root/geant4/bin/Linux-g++/exampleN01 /root/geant4/bin/Linux-g++/exampleN01: error while loading shared libraries: libG4run.so: cannot open shared object file: No such file or directory *************************************************************************** I'm using geant4.6.2.p02 because I compiled also this version of geant4 ***************************************************************************