- 다른 뜻에 대해서는 우분투16 php-mbstring 설치 문서를 참조하십시오.
- 우분투16 php-mbstring 설치
- - The requested PHP extension ext-mbstring * is missing from your system.
- PHP mbstring extension missing (PHP configuration parameter --enable-mbstring).
1 확인[ | ]
Console
Copy
root@zetawiki:~# apt list php-mbstring
Listing... Done
php-mbstring/xenial,xenial 1:7.0+35ubuntu6 all
Console
Copy
root@zetawiki:~# php -m | grep mbstring
root@zetawiki:~# php -r "mb_strlen();"
PHP Fatal error: Uncaught Error: Call to undefined function mb_strlen() in Command line code:1
Stack trace:
#0 {main}
thrown in Command line code on line 1
2 설치[ | ]
Console
Copy
root@zetawiki:~# apt install php-mbstring
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
php7.0-mbstring
The following NEW packages will be installed:
php-mbstring php7.0-mbstring
0 upgraded, 2 newly installed, 0 to remove and 36 not upgraded.
Need to get 467 kB of archives.
After this operation, 1,508 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Console
Copy
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 php7.0-mbstring amd64 7.0.15-0ubuntu0.16.04.4 [465 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 php-mbstring all 1:7.0+35ubuntu6 [1,940 B]
Fetched 467 kB in 0s (1,202 kB/s)
Selecting previously unselected package php7.0-mbstring.
... (생략)
Processing triggers for php7.0-fpm (7.0.15-0ubuntu0.16.04.4) ...
3 확인 2[ | ]
Console
Copy
root@zetawiki:~# apt list php-mbstring
Listing... Done
php-mbstring/xenial,xenial,now 1:7.0+35ubuntu6 all [installed]
Console
Copy
root@zetawiki:~# php -m | grep mbstring
mbstring
Console
Copy
root@zetawiki:~# php -r "mb_strlen();"
PHP Warning: mb_strlen() expects at least 1 parameter, 0 given in Command line code on line 1
4 (Optinal) 아파치 리로드[ | ]
![](https://z-images.s3.amazonaws.com/thumb/e/ec/Crystal_Clear_app_xmag.svg/24px-Crystal_Clear_app_xmag.svg.png 1.5x, https://z-images.s3.amazonaws.com/thumb/e/ec/Crystal_Clear_app_xmag.svg/32px-Crystal_Clear_app_xmag.svg.png 2x)
- 웹에도 적용하려면 아파치 리로드
Console
Copy
root@zetawiki:~# /etc/init.d/apache2 reload
[ ok ] Reloading apache2 configuration (via systemctl): apache2.service.
5 같이 보기[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.