dh_swi_prolog: 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 Debian possible default full paths are:

/usr/bin/dh_swi_prolog - from package: swi-prolog-nox

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