Install php-imap for PHP 7.2.10

Virtualmin uses the default PHP 5.4.16
I have a 2nd version installed for some clients: PHP 7.2.10
I am using Centos 7

I am trying to install php-imap for php 7.2.10
yum install php72u-imap
I get this error:
–> Running transaction check
—> Package php72u-common.x86_64 0:7.2.19-1.el7.ius will be installed
–> Processing Conflict: php72u-imap-7.2.19-1.el7.ius.x86_64 conflicts php-imap < 7.2.19-1.el7.ius
–> Processing Conflict: php72u-common-7.2.19-1.el7.ius.x86_64 conflicts php-common < 7.2.19-1.el7.ius
–> Finished Dependency Resolution
Error: php72u-common conflicts with php-common-5.4.16-46.el7.x86_64
Error: php72u-imap conflicts with php-imap-5.4.16-9.el7.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Any suggestions on how to install php-imap for PHP 7.2.10?

Instead of shell, do it through webmin/virtualmin dashboard packages installer.

In Webmin…System…Software Packages I am able to install php-imap 5.4.16-9.el7 for the default PHP 5.4.16

However I also have PHP 7.2.10 installed. I am unable to install php-imap for that optional PHP version.

Howdy,

Note that this here is our recommendation for installing an additional PHP version on CentOS:

https://www.virtualmin.com/documentation/web/multiplephp#toc-installing-php-72-on-centos-6-and-7-yTjimn_w

In your case there, it looks like there’s some third party repositories enabled that are conflicting, which is preventing the new PHP packages from being installed.

If possible, our recommendation would be to disable any third party repositories, remove any PHP packages that came from them – and then to install PHP 7.2 using the instructions above.

Alternatively, if that’s not an option, another option would be to disable one of the third party repositories (as it looks like there’s two different third party repos that are conflicting), and you then may be able to install the PHP packages you need from the other that’s currently enabled.

-Eric

Centos 7 box.

On a fresh install PHP 5.4.16 and PHP 7.2.10 are included so I don’t think it is a repository issue.

PHP 5.4.16 has php-imap included and installed.

PHP 7.2.10 does not have php-imap included. I would like to install php-imap on this version as well. Is Webmin restricted to only one version of php-imap or can it be installed for each PHP version on the system? If multiple php-imap are allowed any suggestion about how to do that?

Howdy,

You’re correct that PHP 7.2 is provided when Virtualmin is installed, that comes from the CentOS SCL repo.

In your case above, it looks like the third party IUS repo has been enabled though, which is causing problems. I initially thought a second third party repo was enabled, but that doesn’t appear to be the case.

If you disable the IUS repo, that will prevent the conflict you’re seeing and allow you to install the SCL version of the PHP IMAP module.

-Eric

Here is my repo list. I don’t see an IUS repo.
Do you have the command(s) to install the SCL version of php-imap?

yum repolist
Loaded plugins: fastestmirror, langpacks
Skipping unreadable repository ‘/etc/yum.repos.d/virtualmin.repo’
Determining fastest mirrors

  • base: mirrors.mit.edu
  • centos-sclo-rh: mirrors.mit.edu
  • centos-sclo-sclo: mirrors.mit.edu
  • epel: mirror.uic.edu
  • extras: mirror.wdc1.us.leaseweb.net
  • updates: mirrors.mit.edu
    repo id repo name status
    base/7/x86_64 CentOS-7 - Base 10,019
    centos-sclo-rh/x86_64 CentOS-7 - SCLo rh 8,219
    centos-sclo-sclo/x86_64 CentOS-7 - SCLo sclo 780
    epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,237
    extras/7/x86_64 CentOS-7 - Extras 419
    updates/7/x86_64 CentOS-7 - Updates 2,137
    repolist: 34,811

I found the solution and installation instructions.

https://centos.pkgs.org/7/centos-sclo-x86_64/sclo-php72-php-imap-7.2.10-1.el7.x86_64.rpm.html

restart apache

Thanks for your help!