@angelbroit means that the variable TERM is not set for the whole environment, but it is available locally for root user.
To fix this we need to make the variable globally through 'export'.
1. connect to your server via SSH as root2. Find out your TERM valueon the terminal execute
# echo $TERM
my result for e.g. is
xterm-256color
if yours is "dumb" then use "dump"
compare the output with
# printenv TERM
it probably differs. either way proceed with the following.
3. export the variableNow you just could do
# export TERM=xterm-256color
but after a server reboot it would be forgotten.
so we need to put this into ~/.bashrc
# echo "export TERM=xterm-256color" >> ~/.bashrc
or
# echo "export TERM=dumb" >> ~/.bashrc
IMPORTANT: use ">>" it means append. If you use ">" it will replace everything inside the file!
From now on - everytime you login in as root, the .bashrc script will say "make TERM=xterm-256color a public environment variable".
Alternative you could also put "export TERM=xterm-256color" OR "export TERM=dumb" into the cronjob (who sends you the emails) under: "/etc/cron.daily/cwp" to automate it if you like.
Probably good option if you don't login often as root very often.
4. finally: reload/execute .bashrc# source ~/.bashrc
it's the same as logout and login again.
I don't know why this happens. This should be easy peasy for the CWP creators.
ENJOY! Source:
https://linuxconfig.org/term-environment-variable-not-set-solutionSource:
https://github.com/dockerfile/mariadb/issues/3