Search code examples
phpredhatrpmyummbstring

Dependency error when install php-mbstring module on RedHat 7.9 and php 7.2


On centos (7.6), I've a script to deploy a set of php dependencies with yum tools and remi-repo. I need to migrate this installation set on a redhat (7.9). On this distribution, I've this issue during installation of php-mbdstring module.

The lib libonig.so.105()(64bit) is missing. I don't found anything to fix this dependencies clearly. I've tried to install the oniguruma( and -devel) but the lib (/usr/lib64/libonig.so.5) version doesn't match with the dependency requirement. Here the output of the yum install command.

---> Package php-mbstring.x86_64 0:7.2.34-1.el7.remi will be installed
Checking deps for php-mbstring.x86_64 0:7.2.34-1.el7.remi - u
looking for ('php-common(x86-64)', 'EQ', ('0', '7.2.34', '1.el7.remi')) as a requirement of php-mbstring.x86_64 0:7.2.34-1.el7.remi - u
looking for ('libc.so.6(GLIBC_2.14)(64bit)', None, (None, None, None)) as a requirement of php-mbstring.x86_64 0:7.2.34-1.el7.remi - u
looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of php-mbstring.x86_64 0:7.2.34-1.el7.remi - u
looking for ('libpthread.so.0()(64bit)', None, (None, None, None)) as a requirement of php-mbstring.x86_64 0:7.2.34-1.el7.remi - u
looking for ('libonig.so.105()(64bit)', None, (None, None, None)) as a requirement of php-mbstring.x86_64 0:7.2.34-1.el7.remi - u
php-mbstring-7.2.34-1.el7.remi.x86_64 requires: libonig.so.105()(64bit)
--> Processing Dependency: libonig.so.105()(64bit) for package: php-mbstring-7.2.34-1.el7.remi.x86_64
Searching pkgSack for dep: libonig.so.105()(64bit)
--> Finished Dependency Resolution
Dependency Process ending
Error: Package: php-mbstring-7.2.34-1.el7.remi.x86_64 (remi-repo)
           Requires: libonig.so.105()(64bit)

Solution

  • The libonig.so.105()(64bit) is provided by package oniguruma5php in either remi or remi-safe repositories.

    Apparently, you don't have either enabled. For your use case, I would suggest enabling remi-safe (it is enabled by default, you might have disabled it by mistake):

    yum install yum-utils
    yum-config-manager --enable remi-safe
    # dependency should be pulled in without problem:
    yum install php-mbstring