avahi-publish: 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/avahi-publish - from package: avahi-tools

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

On Debian possible default full paths are:

/usr/bin/avahi-publish - from package: avahi-utils

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