xapian-compact: 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/xapian-compact - from package: xapian-core

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/xapian-compact - from package: xapian-tools

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