Asked  2 Years ago    Answers:  5   Viewed   105 times

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:
 * extras:
 * updates:
Setting up Install Process
No package php-mbstring available.
Error: Nothing to do

But no packages were found?



do the following:

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

under the section updates, comment out the mirrorlist line (put a # in front of the line), then on a new line write:


now try:

yum install php-mbstring

(afterwards you'll probably want to uncomment the mirrorlist and comment out the baseurl)

Tuesday, September 27, 2022

php-* are base packages, 1 repository per version

  • "remi" => php 5.4
  • "remi-php55" => php 5.5
  • "remi-php56" => php 5.6
  • "remi-php70" => php 7.0 (Release Candidate, not ready for prod)

php56-* packages are Software Collections, parallel installation allowing to run multiple versions of PHP.

See :

So, if you only want a single php version 5.6

yum --enablerepo=remi-php56 install php-cli (and other needed modules)

And you can also enable the repository for future update (as the "remi-php56" is safe and only provides php 5.6 and its extension)

yum-config-manager --enable remi-php56
Wednesday, November 23, 2022

Try Justin's solution first with pecl (you'll want to use yum rather than aptitude to install php-devel), but if that doesn't work, I happen to have the manual build procedures on hand already for my own deploy reference. :)

Installing the PHP MongoDB driver

As root:

  1. export PHP_AUTOCONF=/usr/bin/autoconf
  2. export PHP_AUTOHEADER=/usr/bin/autoheader
  3. wget
  4. tar -xzf mongo-1.0.9.tgz
  5. cd mongo-1.0.9
  6. phpize
  7. ./configure
  8. make && make install
  9. To /etc/php.d/mongo.ini, add:
Saturday, December 24, 2022

You just need to install ClamAV like normal (with the epel repo)...

yum install clamav
yum install clamav-devel

If you don't have EPEL you can get it from IUS community (if you want you can also grab the IUS repo and get the latest version of PHP) - thank the RackSpace engineers for this!

rpm -ivh epel-release-6-5.noarch.rpm

Then you download and install this library, which will handle all the hard things for you.

wget **the direct link you got**
tar -xvzf php-clamav_0.15.7.tar.gz
cd php-clamav-0.15.7
make install

Now add the extension to your /etc/php.ini


Remember to change the path to what was given to you by make install

then restart your Apache

service httpd restart

Make a file with the contents:

    echo cl_info();

It should come up with something like this:

Now you should have access to all the library functions, you can now scan files like this:

$retcode = cl_scanfile($file, $virus_name);

if ($retcode === CL_VIRUS)
    echo "Virus Detected! {$virus_name}";

Congratulations! You can find other functions here

Thursday, November 3, 2022

Please read the Wizard instructions

If you need a single version, using remi-php72 repository, and the php-* packages, the command will be php.

# yum-config-manager --enable remi-php72
# yum update
# yum install php-cli
# php -v

If you need multiples versions, the php72-php-* packages are available, and the command is php72 or

# yum install php72-php-cli
# php72 -v
# scl enable php72 bash
# php -v

So, according to your question, you have enable the remi-php72 repository, but installed the php72* packages from the remi-safe repository...

Sunday, November 20, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :

Browse Other Code Languages