ROOT Installation Guide » History » Version 2
Ole Hansen, 05/17/2018 05:27 PM
1 | 1 | Ole Hansen | h1. ROOT Installation Guide |
---|---|---|---|
2 | |||
3 | {{toc}} |
||
4 | |||
5 | "ROOT":https://root.cern is an advanced software package developed at "CERN":https://home.cern, the European Organization for Nuclear Research. It is widely used for data analysis and visualization in high-energy physics and nuclear physics as well as other fields. |
||
6 | |||
7 | ROOT can easily run on any modern laptop. You will need at least 2 GB of memory (4 GB recommended) and about 1 GB of disk space (2-3 GB if building from source). |
||
8 | |||
9 | Installing the software varies in difficulty from very easy to fairly high, depending on whether or not your computer is one of the "supported platforms":https://root.cern/supported-platforms. In general, there are three typical ways to get ROOT: |
||
10 | |||
11 | # A set of pre-compiled packages provided by your operating system's package manager |
||
12 | 2 | Ole Hansen | ** Very easy to install and almost certain to work well |
13 | 1 | Ole Hansen | ** Easy updating to new versions |
14 | ** Generally requires administrative privilege on your machine |
||
15 | ** Recommended approach, if possible |
||
16 | # A pre-compiled "binary distribution package":https://root.cern/content/release-61206 provided by the ROOT team. |
||
17 | ** Easy, but there is a certain risk of problems due to unexpected incompatibilities |
||
18 | ** Only available for the most recent operating system versions |
||
19 | ** May be installed privately without administrative privilege |
||
20 | ** Requires manual updating |
||
21 | # Building from "source":https://root.cern/building-root |
||
22 | ** Moderately difficult. Experience with building large software packages recommended. |
||
23 | ** Can take several hours to build. Cannot be done while running on laptop battery power. |
||
24 | ** Configuration can be tricky. Updating is a time-consuming manual process. |
||
25 | ** Missing dependencies are detected during configuration and may need to be installed separately |
||
26 | ** Gives access to all ROOT features, including very advanced ones (not generally needed) |
||
27 | |||
28 | The current version of ROOT is 6.12/06 at the time of his writing. Following are instructions to get up and running quickly with this version, if possible, on specific operating systems based on our experience. |
||
29 | |||
30 | h2. Linux |
||
31 | |||
32 | h3. Red Hat Enterprise Linux (RHEL) 7, CentOS 7 and compatible |
||
33 | |||
34 | # Enable the "EPEL":https://fedoraproject.org/wiki/EPEL (Extra Packages for Linux) repository. Follow the "EPEL Quickstart instructions":https://fedoraproject.org/wiki/EPEL#Quickstart. |
||
35 | # Install the core ROOT package. This will install the most commonly used libraries, but more are available. |
||
36 | <pre> |
||
37 | sudo yum install root |
||
38 | </pre> |
||
39 | # To work with ROOT from within python 3, also install python34-root. This will automatically install python 3.4 as well: |
||
40 | <pre> |
||
41 | sudo yum install python34-root |
||
42 | </pre> |
||
43 | |||
44 | h3. Fedora |
||
45 | |||
46 | For Fedora 24 and higher, ROOT 6 is available in the main Fedora repository, although the current version of ROOT, 6.12/06, requires at least Fedora 26. Simply do |
||
47 | <pre> |
||
48 | sudo yum install root |
||
49 | sudo yum install python3-root |
||
50 | </pre> |
||
51 | |||
52 | For Fedora 20-22, CERN offers binary distributions of older versions of ROOT: |
||
53 | |||
54 | * "ROOT 6.08/06 for Fedora 22":https://root.cern/download/root_v6.08.06.Linux-centos7-x86_64-gcc4.8.tar.gz |
||
55 | * "ROOT 6.06/08 for Fedora 21":https://root.cern/download/root_v6.06.08.Linux-fedora21-x86_64-gcc4.9.tar.gz |
||
56 | * "ROOT 6.06/08 for Fedora 20":https://root.cern/download/root_v6.06.08.Linux-fedora20-x86_64-gcc4.8.tar.gz |
||
57 | |||
58 | See [[installing a binary distribution#Installing ROOT from a CERN binary distribution]] for instructions. |
||
59 | |||
60 | To install and use a binary distribution, download it, then open a terminal. Unpack and configure ROOT as follows: |
||
61 | <pre> |
||
62 | tar xf root_v6.08.06.Linux-centos7-x86_64-gcc4.8.tar.gz # change file name as appropriate |
||
63 | source root/bin/thisroot.sh |
||
64 | </pre> |
||
65 | |||
66 | h3. Ubuntu |
||
67 | |||
68 | At present, Ubuntu repositories only offer ROOT 5 packages, which should be considered obsolete. Do not install these. To get ROOT 6 on Ubuntu 14, 16 or 17, download and install the appropriate binary release from CERN: |
||
69 | |||
70 | * "ROOT 6.12/06 for Ubuntu 17":https://root.cern/download/root_v6.12.06.Linux-ubuntu17-x86_64-gcc7.2.tar.gz |
||
71 | * "ROOT 6.12/06 for Ubuntu 16":https://root.cern/download/root_v6.12.06.Linux-ubuntu16-x86_64-gcc5.4.tar.gz |
||
72 | * "ROOT 6.12/06 for Ubuntu 14":https://root.cern/download/root_v6.12.06.Linux-ubuntu14-x86_64-gcc4.8.tar.gz |
||
73 | |||
74 | See [[installing a binary distribution#Installing ROOT from a CERN binary distribution]] for instructions. |
||
75 | |||
76 | h3. Arch Linux, Debian, and other Linux varieties with at least gcc 4.8 |
||
77 | |||
78 | [[Build ROOT from source#Building ROOT from source]]. |
||
79 | |||
80 | h3. RHEL6, CentOS 6 and older Linux distributions |
||
81 | |||
82 | ROOT 6 cannot be installed easily on these systems, not even from source, because the system compiler is too old. (ROOT 6 requires a fully C++11-capable compiler.) Pre-built ROOT 5 packages are available, however. |
||
83 | |||
84 | Of course, it is possible to run ROOT 6 even on quite old Linux systems. One needs to install a modern compiler first, build ROOT from source using that compiler, and run ROOT with that compiler's runtime libraries. This procedure is beyond the scope of this document. |
||
85 | |||
86 | h2. macOS |
||
87 | |||
88 | For macOS/OSX 10.8-10.13, CERN offers binary distributions: |
||
89 | |||
90 | * "ROOT 6.12/06 for macOS 10.13":https://root.cern/download/root_v6.12.06.macosx64-10.13-clang90.tar.gz |
||
91 | * "ROOT 6.12/06 for macOS 10.12":https://root.cern/download/root_v6.12.06.macosx64-10.12-clang90.tar.gz |
||
92 | * "ROOT 6.10/08 for macOS 10.11":https://root.cern/download/root_v6.10.08.macosx64-10.11-clang80.tar.gz |
||
93 | * "ROOT 6.08/06 for macOS 10.10":https://root.cern/download/root_v6.08.06.macosx64-10.10-clang70.tar.gz |
||
94 | * "ROOT 6.06/08 for macOS 10.9":https://root.cern/download/root_v6.06.08.macosx64-10.9-clang60.tar.gz |
||
95 | * "ROOT 6.04/06 for macOS 10.8":https://root.cern/download/root_v6.04.06.macosx64-10.8-clang51.tar.gz |
||
96 | |||
97 | See [[installing a binary distribution#Installing ROOT from a CERN binary distribution]] for instructions. |
||
98 | |||
99 | Please note that using versions of ROOT older than 6.08 is discouraged as those releases were quite buggy. If you still run an old version of macOS, it may be better to get the latest ROOT release and [[build from source#Building ROOT from source]]. |
||
100 | |||
101 | ROOT is available via "Homebrew":https://brew.sh (package root) and "MacPorts":https://www.macports.org (package root6). For example, you can install it from Homebrew on macOS 10.11-10.13 as follows: |
||
102 | |||
103 | Install Homebrew (skip if you have already done that before): |
||
104 | <pre> |
||
105 | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
||
106 | </pre> |
||
107 | Follow the text prompts to complete the installation. Then, install ROOT and Python 3: |
||
108 | <pre> |
||
109 | brew install root python |
||
110 | </pre> |
||
111 | Homebrew's ROOT comes with support for Homebrew's Python 3, while the CERN binary distributions support Apple's native Python 2. However, CERN's binary releases are built with more features enabled. |
||
112 | |||
113 | h2. Windows |
||
114 | |||
115 | ROOT 6 is not supported on Windows platforms. However, CERN maintains a Docker image (based on Ubuntu 16) that should allow you to run a ROOT indirectly under Windows 10 Professional 64-bit. Detailed instructions can be found on "Docker Hub":https://hub.docker.com/r/rootproject/root-ubuntu16. This is an advanced procedure. |
||
116 | |||
117 | Alternatively, you can download and install "VirtualBox":https://www.virtualbox.org and run our "CentOS 7 virtual machine image":http://hallaweb.jlab.org/data_reduc/AnaWork2017/VirtualBox, which has ROOT pre-installed. You will also find installation instructions there. Unfortunately, this requires a large download, about 30 GB of disk space for the uncompressed VM image, and at least 4 GB, preferably 8 GB, of memory on your host computer. However, you'll be independent of remote computers, similar to the Docker image. |
||
118 | |||
119 | As a second alternative, install an "X server":https://sourceforge.net/projects/xming on your Windows machine, then use "PuTTY":https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html with X forwarding enabled to connect to a Unix (or macOS) machine via ssh. At JLab, you could connect to the central ifarm machines, for example. Then run ROOT on the remote machine. This requires a fast network connection. |
||
120 | |||
121 | A third and perhaps best alternative is to run a "VNC server":http://tigervnc.org session on a Unix (or macOS) machine that you have access to and where ROOT is installed (e.g. ifarm). Then connect to that session with a "VNC client":https://www.realvnc.com/en/connect/download/viewer/windows on Windows. |
||
122 | |||
123 | |||
124 | h2. Testing your installation |