Hamama
Hamama

Reputation: 207

How to install mbstring in PHP 7.0.14?

I tried to install PHP package mbstring in PHP 7.0.14 using this command:

yum install php70w-mbstring php70w-json php70w-gd php70w-mcrypt

I get notification:

Install 4 Packages (+2 Dependent packages)

Total size: 2.0 M
Installed size: 13 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test

And farther error conflict:

Transaction check error: file /etc/php.ini from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php-zts/modules/bz2.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php/modules/bz2.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php-zts/modules/calendar.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php/modules/calendar.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php-zts/modules/ctype.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php/modules/ctype.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php-zts/modules/curl.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php/modules/curl.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php-zts/modules/exif.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php/modules/exif.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php-zts/modules/fileinfo.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php/modules/fileinfo.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php-zts/modules/ftp.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file /usr/lib64/php/modules/ftp.so from install of php70w-common-7.0.14-1.w7.x86_64 conflicts with file from package php70u-common-7.0.14-1.ius.centos7.x86_64 file .... ...

Error Summary

I use Sorry, I use CentOS Linux release 7.3.1611

How can I fix this and install mbstring?

I used command yum list php7* to display all available packages under my PHP verison:

Available Packages Name : php70-php-mbstring Arch : x86_64 Version : 7.0.14 Release : 1.el7.remi Size : 524 k Repo : remi-safe Summary : A module for PHP applications which need multi-byte string handling URL : http://www.php.net/ License : PHP and LGPLv2 and BSD and OpenLDAP Description : The php70-php-mbstring package contains a dynamic shared object that will add : support for multi-byte string handling to PHP.

After I did:

yum install php70-php-mbstring

And get:

Installing:
 php70-php-mbstring                                                        x86_64                                                    7.0.14-1.el7.remi                                                     remi-safe                                                    524 k

Important remark:

Error: php70u-common conflicts with php-common-5.4.16-42.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Upvotes: 2

Views: 4468

Answers (1)

Remi Collet
Remi Collet

Reputation: 7041

You are mixing various sources (repositories) which provides PHP stack under different names. This can only raise such issues (conflicts).

  • php-* from base repo (5.4) or "remi" (single version override base packages, 5.4, 5.5, 5.6, 7.0 and 7.1 available)
  • php70w-* from Webtatic
  • php70u-* from IUS
  • php70-php-* from "remi" (multiple versions which can be installed simultaneously, in /opt)

You should choose one provider and use all extensions from it.

So, check which version is installed, and select all extensions from the same repository (package namespace)

For "remi" repository, you can check the Wizard instructions.

Upvotes: 1

Related Questions