"PECL ncurses 설치"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 8개는 보이지 않습니다)
5번째 줄: 5번째 줄:
*[[pecl 설치]]
*[[pecl 설치]]
*[[php-devel 설치]]
*[[php-devel 설치]]
*[[gcc 설치]]
*[[ncurses-devel 설치]]


== 확인 ==
== 확인 ==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# pecl list | grep -i ncurses
[root@zetawiki ~]# pecl list | grep -i ncurses
[root@jmnote ~]# php -r "ncurses_init();"
[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
PHP Fatal error:  Call to undefined function ncurses_init() in Command line code on line 1
</source>
</syntaxhighlight>


== 설치 ==
== 설치 ==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# pecl install ncurses
[root@zetawiki ~]# pecl install ncurses
downloading ncurses-1.0.2.tgz ...
downloading ncurses-1.0.2.tgz ...
Starting to download ncurses-1.0.2.tgz (16,226 bytes)
Starting to download ncurses-1.0.2.tgz (16,226 bytes)
28번째 줄: 29번째 줄:
enable support for wide chars? [autodetect] :  
enable support for wide chars? [autodetect] :  
path to ncurses installation? [autodetect] :  
path to ncurses installation? [autodetect] :  
</source>
</syntaxhighlight>
<syntaxhighlight lang='console'>
... (생략)
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
</syntaxhighlight>
 
==so 파일 등록==
* CentOS
<syntaxhighlight lang='console'>
[root@zetawiki ~]# echo "extension=ncurses.so" > /etc/php.d/ncurses.ini
[root@zetawiki ~]# cat /etc/php.d/ncurses.ini
extension=ncurses.so
</syntaxhighlight>
 
* 우분투
<syntaxhighlight lang='console'>
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
</syntaxhighlight>
 
==확인 2==
<syntaxhighlight lang='console'>
[root@zetawiki ~]# pecl list | grep ncurses
ncurses 1.0.2  stable
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php -m | grep ncurses
ncurses
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php -r "ncurses_init();"
</syntaxhighlight>
:→ 화면 clear 됨


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 02:56 기준 최신판

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 }}