Q&A

php mbstring 설치 오류

2016.02.02 06:55
1,660
0

[root@eond /]# php -r "mb_substr();"
PHP Fatal error:  Uncaught Error: Call to undefined function mb_substr() in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
[root@eond /]# rpm -qa php-mbstring
[root@eond /]# yum info php-mbstring | grep Repo
Repo        : base/7/x86_64
[root@eond /]# yum install php-mbstring -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * epel: ftp.riken.jp
 * epel-debuginfo: ftp.riken.jp
 * epel-source: ftp.riken.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * remi-safe: mirror.innosol.asia
 * updates: ftp.tsukuba.wide.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.4.16-36.el7_1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-36.el7_1 for package: php-mbstring-5.4.16-36.el7_1.x86_64
--> Finished Dependency Resolution
Error: Package: php-mbstring-5.4.16-36.el7_1.x86_64 (base)
           Requires: php-common(x86-64) = 5.4.16-36.el7_1
           Installed: php-common-7.0.2-1.el7.remi.x86_64 (@remi-php70)
               php-common(x86-64) = 7.0.2-1.el7.remi
           Available: php-common-5.4.16-36.el7_1.x86_64 (base)
               php-common(x86-64) = 5.4.16-36.el7_1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@eond /]# rpm -qa php-mbstring
[root@eond /]# rpm -qa php-mbstring
[root@eond /]# service httpd restart
Redirecting to /bin/systemctl restart  httpd.service
[root@eond /]# yum list php70w*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * epel: ftp.riken.jp
 * epel-debuginfo: ftp.riken.jp
 * epel-source: ftp.riken.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * remi-safe: remi.kazukioishi.net
 * updates: ftp.tsukuba.wide.ad.jp
Error: No matching Packages to list
[root@eond /]# 
 


 

centos 가상서버에 php 7 을 설치했습니다.

php mbstring 을 설치하려는데 저런 오류가 나타났습니다.

 

어떻게 해결할 수 있을까요?

 

#yum install php70-php-mbstring

 

php7에 맞는 mbstring이 있는거 같아 이렇게 재설치해줬습니다.

참조 : http://www.rpmfind.net/linux/RPM/remi/enterprise/6/x86_64/php70-php-mbstring-7.0.2-1.el6.remi.x86_64.html

 

#yum install php70-php-common

안되서 이렇게 해줬습니다;

 

결국 안되네요 ; ㅎㅎ

 

참조 :

1. 리눅스 php-mbstring 설치

http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_php-mbstring_%EC%84%A4%EC%B9%98

1. 리눅스에서 phpmyadmin 설치하기

http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_phpMyAdmin_%EC%84%A4%EC%B9%98_(yum)

이온디 Lv. 13
# 라이믹스 스킨 제작은 어디? >>>> XE 레이아웃, 라이믹스 스킨제작은 이온디에서 커스터마이징해드립니다.
# 빠른 라이믹스 커뮤니티용 호스팅을 찾고 계신가요? >>>> 이온디호스팅 서비스는 PHP8 & Redis 서버 캐시를 활용하여 라이믹스에 최적화된 호스팅 서비스를 제공해드립니다. (서버세팅시 웹패널, 내도메인메일서비스도 함께 구축해드립니다.)
https://eond.com

댓글 3

  • remi를 통해 php7을 설치하신것으로 보입니다. 따라서 mbstring도 remi에서 설치해 주셔야 합니다.
    ex)php70-mbstring
  • yum install php-mbstring -y --enablerepo=remi-php70

    기본 repo가 아닌 곳에서 PHP를 설치한 경우, 이후에 모듈을 설치할 때도 같은 repo를 선택해야 합니다.
    remi가 등장하는 것을 보니 remi-php70을 사용하신 것 같네요.

    만약 설치방식이 제가 짐작한 것과 다르다면 위의 명령도 달라질 수 있습니다.

  • @기진곰
    역시........의사한테 갔어야 (__)/;;

    서버는 기진곰님!;;