Overview

Short note on how to install PHP Ncurses on Debian. This post assumes root level access.

Install Dependencies

Install PEAR and the ncurses development packages:

apt-get update
apt-get install -y php-pear
apt-get install -y php5-dev
apt-get install -y ncurses-dev
apt-get install -y libncursesw5-dev

Install PHP Ncurses

Install PHP Ncurses via PECL (hit return on any prompts):

sudo pecl install ncurses

Enable the Extension

Edit /etc/php5/cli/php.ini and register the new extension by adding the following in the ; Dynamic Extensions ; section:

extension=ncurses.so

Verify the Installation

To verify your install, run:

php -i | grep -i ncurses

You should see output similar to:

ncurses
ncurses support => enabled
ncurses library version => x.x