首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Composer安装-需要ext-mbstring

Composer安装-需要ext-mbstring
EN

Stack Overflow用户
提问于 2018-04-23 09:27:32
回答 5查看 15.4K关注 0票数 6

我正在尝试做一个composer install ...,但是我使用requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. (Cpanel)和PHP5.6获得了一个requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.错误。

下面是我试图修复错误的方法。

1:yum search mbstring

代码语言:javascript
复制
============================================= N/S matched: mbstring =============================================
ea-php54-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php55-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php56-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php70-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php71-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php72-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
rh-php56-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
rh-php70-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
rh-php71-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling

2:yum install ea-php56-php-mbstring.x86_64

代码语言:javascript
复制
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
 * EA4: 110.4.45.120
 * cpanel-addons-production-feed: 110.4.45.120
 * base: ftp.cuhk.edu.hk
 * centosplus: ftp.cuhk.edu.hk
 * epel: ftp.cuhk.edu.hk
 * extras: ftp.cuhk.edu.hk
 * ius: hkg.mirror.rackspace.com
 * updates: ftp.cuhk.edu.hk
Package ea-php56-php-mbstring-5.6.35-1.1.5.cpanel.x86_64 already installed and latest version
Nothing to do

似乎已经安装了mbstring,但是当我试图安装composer时,为什么会出错呢?

另一种方法(在cPanel中更新PHP版本)

1: WHM -已设置为7.1

2: cPanel -已经设置为7.1

但是服务器中的版本仍然是5.6

有任何解决require ext-mbstring错误的建议吗?

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2018-04-23 10:21:03

安装rh可以解决这个问题,yum install rh-php56-php-mbstring.x86_64

请检查一下您的服务器上有什么。我的是rh-php56-php-mbstring.x86_64而不是php-mbstring

票数 3
EN

Stack Overflow用户

发布于 2018-07-20 16:38:34

试着用智能安装mbstring php库。

代码语言:javascript
复制
sudo apt-get install php-mbstring php7.1-mbstring
票数 9
EN

Stack Overflow用户

发布于 2018-04-23 09:37:15

使用此命令安装mbstrig

代码语言:javascript
复制
 yum install php-mbstring

一旦安装,重启apache

代码语言:javascript
复制
 service httpd restart
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49977589

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档