ROOTをインストールしようとするとエラーが発生します。

ROOTをインストールしようとするとエラーが発生します。

私はUbuntu 14.0を使用しています。ルートをインストールしたいです。だから私は次の指示に従いました。

https://root.cern.ch/building-root

ステップ4で詰まっています。 ROOTディレクトリにダウンロードして解凍しました。

ホーム/ゾーン/ルート

ディレクトリにインストールすることにしました。

ホーム/ゾーン/ルート

だからフォルダを作って入った。今cmakeを実行したいと思います。

cmake ホーム/ゾーン/ルート

ただし、次のエラーが発生します。

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

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

ROOTConfig.cmake
root-config.cmake

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


-- Configuring incomplete, errors occurred!
See also "/home/john/Root/CMakeFiles/CMakeOutput.log".

基本的に何をすべきか教えてくれます。だからCMakeListsファイルの最後に次の行を追加しました。

SET(CMAKE_INSTALL_PREFIX /ホーム/ゾーン/ルート/)

しかし、これはまったく役に立ちません。

エラーについてインターネットを検索しようとしましたが、他の人はCMAKE_INSTALL_PREFIXをソースパスに設定する必要があると言いました。これをしましたが、うまくいきません。なぜ?

ベストアンサー1

指示に従ってください[1]サブディレクトリで作業し、~/home/Rootソースファイルの検索ページをダウンロードしました2]を選択してファイルを選択しますroot_v6.06.00.source.tar.gz

wget https://root.cern.ch/download/root_<version>.source.tar.gz
tar -zxf root_<version>.source.tar.gz

次に、バージョンディレクトリに移動します(私の場合は~/Root/root-6.06.00)。
その後、cmakeを忘れて、configureディレクトリ内のファイルを使用しました。

./configure       # It founds something and misses other
./configure --all # Just to enable something more
make -j4          # I used 4 cores to compile in parallel
# Take a good nap...  (> 22 minutes)
# Obtained some white and pink warnings (see below) then finally

   ============================================================
   ===                ROOT BUILD SUCCESSFUL.                ===
   === Run 'source bin/thisroot.[c]sh' before starting ROOT ===
   ============================================================

それからbashシェルがあるので、私は次のように書きました:

source bin/thisroot.sh  # Set some variable
bin/root                # Execute ROOT

そして得る

   ------------------------------------------------------------
  | Welcome to ROOT 6.06/00                http://root.cern.ch |
  |                               (c) 1995-2014, The ROOT Team |
  | Built for linuxx8664gcc                                    |
  | From tag v6-06-00, 9 December 2015                         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

 root [0] 

メモ:

  • 警告メッセージ
    /usr/include/qt4/QtCore/qmetatype.h:256:5:
    警告: 'register' ストレージクラス指定子は廃止されました。 [-Wdeprecated-register]

  • 2番目にインストールし、./configure | grep no見逃したライブラリをインストールして再実行することができます:-)。

  • Tarファイルサイズ103MB、オープン305MB、コンパイル+ソース1.3GB

おすすめ記事