bg5pdflatex: 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/bg5pdflatex - from package: texlive-east-asian

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

On Debian possible default full paths are:

/usr/bin/bg5pdflatex - from package: latex-cjk-chinese

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