dpkg-divert: 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/dpkg-divert - from package: dpkg

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

On Debian possible default full paths are:

/usr/bin/dpkg-divert - from package: dpkg
/usr/sbin/dpkg-divert - from package: dpkg

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