Getting error "'xterm': unknown terminal type." while running top and clear command

I am getting below error while running top and clear command. this is centos 7, and I can see env is set as xterm.
please help if any knowing about it.

[root@abc ~]# top
'xterm': unknown terminal type.
[root@abc~]# clear
'xterm': unknown terminal type.
[root@abc ~]# cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
[root@abc ~]# env | grep -i term
TERM=xterm

What do you have in your terminfo directory?

In addition to what @vbe has asked...

  1. What's your TERMINFO env var is set to?

  2. What's you're LD_LIBRARY_PATH is set to?

Install the ncurses-base package!

yum install ncurses-base

(It includes a dozen xterm terminfos.)

ncurses-base Package was there. but any one was removed terminfo and tabset folder from /usr/share. I copied from another server , now working fine.
thanks guys for your help.

Thanks for sharing the solution.
Please verify your "repaired" packages.

rpm --verify ncurses-base && echo ok