GEANT4 11.0.3 Installation Error

Dear Experts I am trying to install version 11.0.3 on Ubuntu 22.04 Make goes well but in make install it gives this error

98%] Built target G4OpenGL_autogen
Consolidate compiler generated dependencies of target G4OpenGL
[100%] Built target G4OpenGL
Install the project…
– Install configuration: “Release”
– Installing: /usr/local/lib/libG4clhep.so
CMake Error at source/externals/clhep/cmake_install.cmake:52 (file):
file INSTALL cannot copy file
“/home/yasir/software/geant4/geant4-v11.0.3/build/BuildProducts/lib/libG4clhep.so”
to “/usr/local/lib/libG4clhep.so”: Permission denied.
Call Stack (most recent call first):
source/externals/cmake_install.cmake:47 (include)
source/cmake_install.cmake:67 (include)
cmake_install.cmake:47 (include)

1 Like

Hi,

It looks like you don’t have write permission to /usr/local/lib .

And you almost certainly don’t want to be writing to /usr/local anything, unless you’re on your personal laptop and you have admin privileges.

Thanks sudo make install solved this problem