Geant4运行B1例子时出现问题。

CMake Error at CMakeLists.txt:15 (find_package):
By not providing "FindGeant4.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Geant4", but
CMake did not find one.

Could not find a package configuration file provided by "Geant4" with any
of the following names:

Geant4Config.cmake
geant4-config.cmake

Add the installation prefix of "Geant4" to CMAKE_PREFIX_PATH or set
"Geant4_DIR" to a directory containing one of the above files. If "Geant4"
provides a separate development package or SDK, be sure it has been
installed.

最后一段给了解决方法,找到吧b1例子的cmake.txt,加一段list(APPEND CMAKE_PREFIX_PATH "/home/wu/work/geant4-build(Geant4Config.cmake的位置)") # 安装路径前缀

原因是你权限问题 , 我和你遇到相同的问题 ,你尝试回到 root 权限下