如何在不使用 sudo 的情况下从源代码构建和安装 ROOT
我推荐将 ROOT 安装到 $HOME/usr。
它紧密基于如何从源代码构建 ROOT 的官方文档。
如果你没有合适的 Python,你可能需要使用
build_root.sh
-Dpyroot=OFF -Dpyroot_experimental=OFF用于第一个 cmake 命令。
git clone –branch v6-25-02 –depth=1 https://github.com/root-project/root.git root_src
build_root.sh
git clone --branch latest-stable --depth=1 https://github.com/root-project/root.git root_src
mkdir root_build && cd root_build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/usr ../root_src
cmake --build . -- install -j$(nproc)然后添加到你的 ~/.bashrc 或类似文件:
thisroot_env.sh
source $HOME/usr/bin/thisroot.shIf this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow