I was getting the same error you might wanna try, with the latest version. And this is what it helped me a lot.
The following list shows the programs required before you can install CEARN ROOT. In an environment with the following specifications.
I have sucessfully install ROOT on a Raspberry pi4
• Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
• 8GB LPDDR4-3200 SDRAM
• 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE
• Gigabit Ethernet
• 2 USB 3.0 ports; 2 USB 2.0 ports.
• Raspberry Pi standard 40 pin GPIO header (fully backwards compatible with previous boards)
• 2 × micro-HDMI ports (up to 4kp60 supported)
• 2-lane MIPI DSI display port
• 2-lane MIPI CSI camera port
• 4-pole stereo audio and composite video port
• H.265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode)
• OpenGL ES 3.0 graphics
• Micro-SD card slot for loading operating system and data storage
• 5V DC via USB-C connector (minimum 3A *)
• 5V DC via GPIO header (minimum 3A *)
• Power over Ethernet (PoE) enabled (requires separate PoE HAT)
• Operating System: Ubuntu-MATE 20.04 LTS
• sd card 64gb Samsung endurance.
Prerequisites
sudo apt-get install git dpkg-dev cmake g ++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev
sudo apt-get install gfortran libssl-dev libpcre3-dev xlibmesa-glu-dev libglew1.5-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python- dev libxml2-dev libkrb5-dev libgsl0-dev libqt4-dev
Optional
sudo apt-get install gfortran libssl-dev libpcre3-dev \
xlibmesa-glu-dev libglew1.5-dev libftgl-dev \
libmysqlclient-dev libfftw3-dev libcfitsio-dev \
graphviz-dev libavahi-compat-libdnssd-dev \
libldap2-dev python-dev libxml2-dev libkrb5-dev \
libgsl0-dev libqt4-dev
Installation
The latest version of ROOT is downloaded, which is a .tar.gz file, for this case the version “root_v6.24.00.source.tar.gz” will be installed.
The next step is to create a directory in any location, in this case it is the Desktop.
The folder to create is called CERN_Root
mkdir CERN_Root
the downloaded .tar.gz file is copied to this newly created directory.
cp <file dir> Downloads / root_v6.20.04.source.tar.gz <new dir> CERN_Root/
cd CERN_Root
unzip the .tar.gz file
tar -zxvf root_v6.20.04.source.tar.gz
It is unzipped and there should be a root-6.20.04 folder, now we create a directory for the for install.
mkdir root-install
We access the root-build folder and load the necessary files with the cmake.
cmake ../root-6.24.00/
now we load all the libraries marking from which directory it should extract them, which is from the unzipped .tar.gz file, with the option -Dall = ON
sudo cmake ~/Desktop/CERN_Root/root-6.24.00/ -Dall=ON
Then run make with
make -jN (where N is the number of cores to be used for the installation)
then
sudo make install
and finally after finished, type root in the terminal.