我正在尝试做一个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
============================================= 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 handling2:yum install ea-php56-php-mbstring.x86_64
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错误的建议吗?
发布于 2018-04-23 10:21:03
安装rh可以解决这个问题,yum install rh-php56-php-mbstring.x86_64。
请检查一下您的服务器上有什么。我的是rh-php56-php-mbstring.x86_64而不是php-mbstring
发布于 2018-07-20 16:38:34
试着用智能安装mbstring php库。
sudo apt-get install php-mbstring php7.1-mbstring发布于 2018-04-23 09:37:15
使用此命令安装mbstrig
yum install php-mbstring一旦安装,重启apache
service httpd restarthttps://stackoverflow.com/questions/49977589
复制相似问题