How to install ncurses library on a Linux (CentOS, Debian)

Ncurses library is missing? What it is and how do I install it on a Linux operating system?

Ncurses is a programming library that provides an API which allows the programmer to write text-based user interfaces in a terminal-independent manner. It is a toolkit for developing “GUI-like” application software that runs under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.

Web hosting offer – €12/year

Installing the ncurses library in Debian/Ubuntu Linux

You need to install the following two packages:
libncurses5-dev : Developer’s libraries for ncurses
libncursesw5-dev : Developer’s libraries for ncursesw

Type following apt-get command in the terminal to install ncurses header and libs:

sudo apt-get install libncurses5-dev libncursesw5-dev

Installing the ncurses library in CentOS/RHEL

You need to install the following package:
ncurses-devel: Developer’s libraries for ncurses

Type following yum command in the terminal to install ncurses header and libs:

sudo yum install ncurses-devel