How do I install mbstring with PHP on CentOS 6.2
I've tried:
$ sudo yum install php-mbstring
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.net.cen.ct.gov
* extras: centos.aol.com
* updates: mirrors.seas.harvard.edu
Setting up Install Process
No package php-mbstring available.
Error: Nothing to do
But no packages were found?
As
yum install php-mbstring
thenhttpd -k restart
didn't do it for me, I think these options should be compiled, as documented here:Though this page says it's optional:
php -v
yum search php-
yum install ea-php56-php-mbstring.x86_64
httpd -k restart
do the following:
under the section
updates
, comment out the mirrorlist line (put a#
in front of the line), then on a new line write:now try:
(afterwards you'll probably want to uncomment the mirrorlist and comment out the baseurl)
If you have cPanel hosting you can use Easy Apache to do this through shell. These are the steps.
Apache and PHP will now rebuild to include the mbstring extension. Wait for the process to finish ~10 to 30 minutes. Once the process is finished you should see the Mbstring extension in the phpinfo now.
For more detailed steps see the article Installing the mbstring extension with Easy Apache
If none of the above help you out, and you have the option, try obtaining one of the rpm files eg:
wget http://rpms.famillecollet.com/enterprise/6/remi/x86_64/php-mbstring-5.4.45-2.el6.remi.x86_64.rpm
then using rpm, install it ignoring the depenecies like so:
rpm -i --nodeps php-mbstring-5.4.45-2.el6.remi.x86_64.rpm
Hope that helps out.