PECL ncurses 설치

PECL ncurses 설치
PHP ncurses 설치

1 사전작업[편집]

2 확인[편집]

[root@zetawiki ~]# pecl list | grep -i ncurses
[root@zetawiki ~]# php -m | grep ncurses
[root@zetawiki ~]# php -r "ncurses_init();"
PHP Fatal error:  Call to undefined function ncurses_init() in Command line code on line 1

3 설치[편집]

[root@zetawiki ~]# pecl install ncurses
downloading ncurses-1.0.2.tgz ...
Starting to download ncurses-1.0.2.tgz (16,226 bytes)
......done: 16,226 bytes
7 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
enable support for wide chars? [autodetect] : 
path to ncurses installation? [autodetect] :
... (생략)
Build process completed successfully
Installing '/usr/lib64/php/modules/ncurses.so'
install ok: channel://pecl.php.net/ncurses-1.0.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=ncurses.so" to php.ini

4 so 파일 등록[편집]

  • CentOS
[root@zetawiki ~]# echo "extension=ncurses.so" > /etc/php.d/ncurses.ini
[root@zetawiki ~]# cat /etc/php.d/ncurses.ini
extension=ncurses.so
  • 우분투
root@zetawiki:~# echo "extension=ncurses.so" > /etc/php5/cli/conf.d/ncurses.ini
root@zetawiki:~# cat /etc/php5/cli/conf.d/ncurses.ini
extension=ncurses.so

5 확인 2[편집]

[root@zetawiki ~]# pecl list | grep ncurses
ncurses 1.0.2   stable
[root@zetawiki ~]# php -m | grep ncurses
ncurses
[root@zetawiki ~]# php -r "ncurses_init();"
→ 화면 clear 됨

6 같이 보기[편집]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}