"./configure --with-root=root-installation-directory" is not working

Ubuntu version (virtualbox) - 22.04
g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
ROOT Version: 6.28/00
Pythia8307

Please, I’ve been trying to do Pythia8 analysis with ROOT but it has not worked. I have been using the Python for my Pytha8 proton-proton simulation, but now I switched to ROOT BUT I am not able to make the very first example.

I know that I have do: ./configure --with-root=root-installation-directory
before doing a “make”

The thing is I installed ROOT using the snap package, so my dir is always: /snap/bin

make **** leads to the error below
*** Error: **** requires ROOT.

Please, I would appreciate your help!

Thanks!

I don’t really get the answer, could you please add a few comments?
fyi: I already have ROOT, Pythia8307 and g++ installed on my Virtualbox.

thanks

I have been able to isolate this problem.
Ace