Ошибка CMake в CMakeLists.txt:13 (find_package): не обеспечивая “FindGeant4.cmake” в CMAKE_MODULE_PATH

У меня есть проблема при попытке установить Geant4 в системе Linux.

$ cmake ..
CMake Error at CMakeLists.txt:13 (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.


-- Configuring incomplete, errors occurred!
See also "/home/dell/Desktop/geant4/geant4.9.6/examples/basic/B1/build/CMakeFiles/CMakeOutput.log".

Я попробовал:

apt-get install g++

Но я добираюсь:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
0
задан 8 March 2017 в 02:13

2 ответа

Просто необходимо получить geant4.sh

В оболочке удара, дать команду:

source /path_to_geant4_install/bin/geant4.sh

И затем делают cmake

1
ответ дан 3 November 2019 в 16:09

У меня была похожая проблема.

Может помочь добавить эти команды в .bashrc:

source /home/user/geant4-install directory/bin/geant4.sh

source /home/user/geant4-install directory/share/geant4-version number/geant4make/geant4make.sh

export G4WORKDIR=/home/user/g4work
1
ответ дан 2 July 2020 в 10:51

Другие вопросы по тегам:

Похожие вопросы: