How can i resolve this error when installing ROOT

First, your system is not Ubuntu 20.04 which has gcc 9.3.0. It could be Ubuntu 18.04 with gcc 7.5.0.

Then, try with: “-Dall=ON -Dcuda=OFF -Dtmva-gpu=OFF