问题
i've tried to install the extension mbstring but i have the following error:
Error: Package: php-mbstring-5.4.16-23.el7_0.3.x86_64 (updates)
Requires: php-common(x86-64) = 5.4.16-23.el7_0.3
Installed: php-common-5.4.38-1.el7.remi.x86_64 (@remi)
php-common(x86-64) = 5.4.38-1.el7.remi
Available: php-common-5.4.16-21.el7.x86_64 (base)
php-common(x86-64) = 5.4.16-21.el7
Available: php-common-5.4.16-23.el7_0.x86_64 (updates)
php-common(x86-64) = 5.4.16-23.el7_0
Available: php-common-5.4.16-23.el7_0.1.x86_64 (updates)
php-common(x86-64) = 5.4.16-23.el7_0.1
Available: php-common-5.4.16-23.el7_0.3.x86_64 (updates)
php-common(x86-64) = 5.4.16-23.el7_0.3
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
What could i do to resolve the problem ?
Thanks for your help
回答1:
For people who want to know how to solve this :
sudo yum remove php-common
Then you can:
sudo yum install php-mbstring
It will automaticcaly install dependecies (php-common)
回答2:
This answer from AWS Amazon forum:
yum -y install yum-utils
yum repolist all
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
Then you can install php-mbstring
, and maybe, I don't know exactly, but maybe it can help for servers on Amazon only.
回答3:
The selected answer is liable to change the installed PHP version. When not using the stock CentOS PHP, yum
will try to install the mbstring
extension for the wrong version of PHP.
You can check your installed PHP version with php -v
:
$ php -v
PHP 5.5.36 (cli) (built: May 28 2016 12:05:32)
Then go ahead and install the correct mbstring
version for your installed PHP version:
$ sudo yum install php55w-mbstring
回答4:
Been searching for the answer for half day, then only realise cPanel / WHM version of CentOS will disable YUP to update php. You shall remove php*
from exclude list in /etc/yum.conf
.
回答5:
Non of above works for godaddy dedicated server centOS 6, apache 2.4, php 5.6
Instead, you should
Install the mbstring PHP Extension with EasyApache
check if you already have it by, putty or ssh
php -m | grep mbstring
[if nothing, means missing mbstring]
Now you need to goto godaddy your account page,
click manager server,
open whm ----- search for apache,
open "easy apache 4"(my case)
Now you need customize currently installed packages,
by
click "customize" button on top line next to "currently installed package..."
search mbstring,
click on/off toggle next to it.
click next, next, .... privision..done.
Now you should have mbstring
by check again at putty(ssh)
php -m | grep mbstring [should see mbstring]
or you can find mbstring at phpinfo() page
回答6:
Non of above works for godaddy dedicated server centOS 6, apache 2.4, php 5.6
Instead, you should install the mbstring PHP Extension with EasyApache check if you already have it by, putty or ssh
php -m | grep mbstring [if nothing, means missing mbstring]
Now you need to go to godaddy your account page,
1.click manager server,
2.open whm ----- search for apache,
3.open "easy apache 4"(my case)
Now you need customize currently installed packages,by
4.click "customize" button on top line next to "currently installed package..."
5.In the search bar write "mbstring",
6.click on/off toggle next to it.
7.click next, next, .... privision..done.
Now you should have mbstring by check again at putty(ssh)
php -m | grep mbstring [should see mbstring]
or you can find mbstring at phpinfo() page
Thanks, my problem is done
回答7:
You must specify the same version as your php-common, mine is php70w-common
sudo yum install php70w-mbstring
回答8:
need to search which mbstring version required you.
cat /etc/redhat-release && php -v && 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
ea-php73-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
now you can check what you actually need like i am using php7.1 so my command will be
sudo yum install ea-php71-php-mbstring
回答9:
Fedora 28 (Cloud Edition)
sudo yum install php56-php-mbstring
sudo yum install php70-php-mbstring
sudo yum install php71-php-mbstring
sudo yum install php72-php-mbstring
sudo yum install php73-php-mbstring
来源:https://stackoverflow.com/questions/28739892/centos-7-cant-install-php-mbstring-extension