How can I fix this? I am getting each time after compiling code in pythia or in root environment

root [0] .x pythia8.C

PYTHIA Error: settings file /path/to/pythia81xx/xmldoc/Index.xml not found
PYTHIA Abort from Pythia::Pythia: settings unavailable
PYTHIA Abort from Pythia::init: constructor initialization failed
Error in TRint::HandleTermInput(): std::out_of_range caught: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

ROOT Version: “6.20/04”
Platform: Ubuntu 18.04
Compiler: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

Try to:

export PYTHIA8DATA=`locate -b '\xmldoc'`

Thanks for your help.