Posts Tagged ‘macports’

PHP5.3 Ncurses with Macports

Friday, February 26th, 2010

I’ve been running PHP5.3 for some time now on my Mac (trough Macports) and had very little problems with it. Recently I started playing a little with the ncurses support in PHP though and found out that it’s actually not bundled with PHP anymore (why? what harm did it do?).

Anyway, shouldn’t be a big problem. Just run pecl install ncurses. Well, not so much. Pecl decided to refuse to find my ncurses-install and throw this at me:
checking for initscr in -lncursesw... no
configure: error: Wrong ncurses lib version or lib not found
ERROR: `/private/tmp/pear/temp/ncurses/configure --enable-ncursesw=autodetect --with-ncurses' failed

I figured that I just needed to pass the correct path to the library when installing as there is a prompt for wide-char-support and for the path to the ncurses installation. No luck there either. Finally I tested an earlier version of the extension (1.0.0) but again no luck.

I ended up downloading, building and installing the package manually as per the instructions here and that worked smoothly. Just had to expliclity enable the extension in /opt/local/etc/php5/php.ini but that shouldn’t be a problem.

Terminal goodness! :-)