log98 wrote:
error:TERM environment variable not set.
This is a shell message. Linux needs to know which terminal type you are logged in from, in order to display any output. This is usually set automatically by the default, or user, login script, that is run when you first login to the system. I'm not sure what the above code is trying to do, but you need to find some way of getting this set before the actual command runs.