pcre2test: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/pcre2test - from package: pcre2-tools

You may install the required package with command yum install {package}
Error in other languages:
pcre2test: bevel nie gevind nie
pcre2test: comandă negăsită
pcre2test: comando não encontrado
pcre2test: commande introuvable
pcre2test: command not found
pcre2test: käsku ei ole
pcre2test: không tìm thấy lệnh
pcre2test: komanda nerasta
pcre2test: Kommando nicht gefunden.
pcre2test: kommandot finns inte
pcre2test: komut yok
pcre2test: nie znaleziono polecenia
pcre2test: níor aimsíodh an t-ordú
pcre2test: no se encontró la orden
pcre2test: no s'ha trobat l'ordre
pcre2test: opdracht niet gevonden
pcre2test: parancs nem található
pcre2test: perintah tidak ditemukan
pcre2test: príkaz nenájdený
pcre2test: příkaz nenalezen
pcre2test: команда не найдена
pcre2test: командата не е открита
pcre2test: 命令找不到
pcre2test: コマンドが見つかりません