Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running PHP 5.3.5.

Now I need to install the php-mbstring module.

When I run:

yum install php-mbstring

I am asked to update PHP:

 php-mbstring                              x86_64                              5.3.6-3.el5.remi                                remi                              2.3 M
Updating for dependencies:
 mysql                                     x86_64                              5.5.11-1.el5.remi                               remi                              7.4 M
 mysql-libs                                x86_64                              5.5.11-1.el5.remi                               remi                              1.1 M
 mysql-server                              x86_64                              5.5.11-1.el5.remi                               remi                               12 M
 php                                       x86_64                              5.3.6-3.el5.remi                                remi                              1.4 M
 php-cli                                   x86_64                              5.3.6-3.el5.remi                                remi                              2.6 M
 php-common                                x86_64                              5.3.6-3.el5.remi                                remi                              973 k
 php-devel                                 x86_64                              5.3.6-3.el5.remi                                remi                              623 k
 php-gd                                    x86_64                              5.3.6-3.el5.remi                                remi                              208 k
 php-mysql                                 x86_64                              5.3.6-3.el5.remi                                remi                              159 k
 php-pdo                                   x86_64                              5.3.6-3.el5.remi                                remi                              117 k
 php-xml                                   x86_64                              5.3.6-3.el5.remi                                remi                              221 k

Transaction Summary
Install      1 Package(s)         
Update      11 Package(s)         
Remove       0 Package(s) 

How can I install the module for the PHP version 5.3.5 so that I can avoid updating PHP?


share|improve this question
up vote 1 down vote accepted

To install a specific version of a package with YUM, you append a dash and the version to the package name. But the versions used by YUM/RPM are slightly different from the official versions, as shown by the version column in the output you provided. So first, run yum info to check what version you have installed:

yum info installed php

Once you've figured that out, then you can install the right version. For example, if the installed version was 5.3.6-1.el5.remi, you'd run:

yum install php-mbstring-5.3.5-1.el5.remi

That being said, PHP 5.3.6 fixes 6 security bugs and over 60 other problems. It introduces no major changes and will not break existing applications. You really should upgrade.

share|improve this answer
Thanks a lot. It was very helpful – dan Apr 16 '11 at 22:07
No package php-mbstring-5.3.5-1.el5.remi available. – andufo Dec 8 '11 at 0:45
@andufo: It looks like Remi keeps only one old version of a package around at one time. – Patches Dec 9 '11 at 0:06
@Patches yes, i changed your line for php-mbstring-5.3.8-1.el5.remi.1 :) – andufo Dec 9 '11 at 1:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .