While installing vim from source on CentOS 6.5, I ran into the following error.

checking for tgetent()... configure: error: NOT FOUND!  
You need to install a terminal library; for example ncurses.  
Or specify the name of the library with --with-tlib.  

To fix this, I installed the ncurses library through yum using the following command

sudo yum install ncurses-devel