Search code examples
phpcentosmbstring

php-mbstring won't install on CentOS 7 and PHP 7.1.21


Need to get php-mbstring installed on a CentOS 7 server running PHP 7.1.21. I have spent hours trying every possible solution I could find. Looks like there is a conflict when trying to install with the remi repo. No matter what I try, the best result I can get is below:

# yum install php-mbstring
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: mirror.steadfastnet.com
 * epel: mirror.steadfastnet.com
 * extras: mirror.steadfastnet.com
 * remi-php71: mirror.team-cymru.com
 * remi-safe: mirror.team-cymru.com
 * updates: mirror.steadfastnet.com
base                                                         | 3.6 kB  00:00:00
extras                                                       | 3.4 kB  00:00:00
updates                                                      | 3.4 kB  00:00:00
Excluding 8 updates due to versionlock (use "yum versionlock status" to show them)
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:7.1.26-1.el7.remi will be installed
--> Processing Dependency: php-common(x86-64) = 7.1.26-1.el7.remi for package: php-mbstring-7.1.26-1.el7.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-mbstring-7.1.26-1.el7.remi.x86_64 (remi-php71)
           Requires: php-common(x86-64) = 7.1.26-1.el7.remi
           Installed: php-common-7.1.21-1.el7.remi.x86_64 (@remi-php71)
               php-common(x86-64) = 7.1.21-1.el7.remi
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Any ideas out there?


Solution

  • Excluding 8 updates due to versionlock (use "yum versionlock status" to show them)

    Explanation in above message.

    You have php version 7.1.21 installed when current available version is 7.1.26.

    The repository only have the 2 latest versions online. So you need to manually download and install the OLD package : php-mbstring-7.1.21-1.el7.remi.x86_64.rpm

    Or better, remove the lock for this version. The "remi-php71" repository will always provides 7.1.x, and you will only receive new minor versions.

    PHP 7.1 is now in security mode, and 7.1.21 is affected by lot of public security issues.