How to install PHP mbstring on CentOS 6.2

How to install mbstring from PHP on CentOS 6.2

I 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 found?

+42
linux php centos mbstring
Apr 23 '12 at 10:10
source share
7 answers

follow these steps:

 sudo nano /etc/yum.repos.d/CentOS-Base.repo 

in the updates section, comment out the line in the mirror list (put a # in front of the line), then write in a new line:

 baseurl=http://centos.intergenia.de/$releasever/updates/$basearch/ 

now try:

 yum install php-mbstring 

(later on, you probably want to uncomment the mirror list and comment out baseurl)

+36
Apr 23 2018-12-12T00:
source share

If you have cPanel hosting, you can use Easy Apache to do this through the shell. These are the steps.

  • Enter the Easy Apache PathType path for Easy Apache

    root @vps #### [~] # / scripts / easyapache

  • Do not say yes to the available cPanel update.
  • Continue through the screens with the default settings until you go to the "List of exhaustive options."
  • Down until you see the Mbstring extension and select it.
  • Continue the steps and save the Apache PHP assembly.

Apache and PHP will now be rebuilt to include the mbstring extension. Wait for the process to complete ~ 10 to 30 minutes. After the process is complete, you should see the Mbstring extension in phpinfo now.

For more detailed instructions, see Install the mbstring extension using Easy Apache.

+29
Dec 28 '12 at 16:28
source share

Please check your /etc/yum.conf file, maybe it excludes php packages.

You should remove php* from this line so you can load php-* packages:

 exclude= courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* php* 

It seems your server has scripts like cPanel

+15
May 15 '16 at 2:04
source share

* Make sure you update your linux box first.

 yum update 

If anyone else has this problem, this is a valid solution:

centos-release: rpm -q centos-release

Centos 6. *

 wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm 

Centos 5. *

 wget http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm rpm -ivh epel-release-5-4.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm rpm -Uvh remi-release-5*.rpm 

Then just do it with update :

 yum --enablerepo=remi upgrade php-mbstring 

Or this to install :

 yum --enablerepo=remi install php-mbstring 
+11
Mar 06 '14 at 15:54
source share

yum install php-mbstring (according to http://php.net/manual/en/mbstring.installation.php )

I think you need to install the EPEL repository http://fedoraproject.org/wiki/EPEL

+4
Apr 23 2018-12-12T00:
source share

Like yum install php-mbstring , then httpd -k restart did not do this for me, I think these parameters should be compiled as described here :

Now configure and create PHP. Here you configure PHP using various options, for example, which extensions will be included. Run. / configure --help for a list of available options. In our example, we will do a simple setup with support for Apache 2 and MySQL.

If you created Apache from the source, as described above, the example below will match your path for apxs, but if you installed Apache some other path, you need to configure the path to apxs accordingly. Please note that some distributions may rename apxs to apxs2.

 cd ../php-NN ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-mbstring make make install 

If you decide to change the configuration settings after installation, you will need to repeat the configuration steps, make and make install. You only need to restart apache for the new module to take effect. recompiling Apache is not required.

Note that unless otherwise stated, "make install" will also install PEAR, various PHP tools such as phpize, installing the PHP CLI, etc.

Although this page says it is optional:

- enable-MBstring Allows support of a multibyte character string. This is optional, as slow user code will be used if it is not available.

+1
Feb 11 '14 at 8:51
source share

If none of the above helps you, and you have an option, try getting one of the rpm files, for example:

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 dependencies:

rpm -i --nodeps php-mbstring-5.4.45-2.el6.remi.x86_64.rpm

Hope this helps.

0
Dec 23 '15 at 16:29
source share



All Articles