avahi-publish-service: 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

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-service - 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-service - from package: avahi-utils

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