Failed to install php Imagick extension

Issues related to applications and software problems
Post Reply
sndcse
Posts: 1
Joined: 2023/12/14 17:04:12

Failed to install php Imagick extension

Post by sndcse » 2023/12/14 17:25:48

Hi Team,

I am using php5.6.33 and php7.2.24 on CentOS 7.

I have installed PHP 7.2 using the below repos.
CentOS-SCLo-scl.repo
CentOS-SCLo-scl-rh.repo

I need to install the Imagick php extension. During installation, I am getting the below error.

[root@mail ~]# yum install sclo-php72-php-pecl-imagick
Loaded plugins: fastestmirror, versionlock
https://repo.saltstack.com/yum/redhat/7 ... repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

Loading mirror speeds from cached hostfile
* base: mirror.facebook.net
* centos-sclo-rh: centos-distro.1gservers.com
* centos-sclo-sclo: nocix.mm.fcix.net
* epel: mirror.arizona.edu
* extras: mirrors.raystedman.org
* updates: mirror.sfo12.us.leaseweb.net
Resolving Dependencies
--> Running transaction check
---> Package sclo-php72-php-pecl-imagick.x86_64 0:3.4.4-3.el7 will be installed
--> Processing Dependency: libMagickCore-6.Q16.so.6()(64bit) for package: sclo-php72-php-pecl-imagick-3.4.4-3.el7.x86_64
--> Processing Dependency: libMagickWand-6.Q16.so.6()(64bit) for package: sclo-php72-php-pecl-imagick-3.4.4-3.el7.x86_64
--> Running transaction check
---> Package ImageMagick.x86_64 0:6.7.8.9-15.el7_2 will be updated
--> Processing Dependency: ImageMagick = 6.7.8.9-15.el7_2 for package: ImageMagick-devel-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: ImageMagick-devel-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: ImageMagick-devel-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
---> Package ImageMagick.x86_64 0:6.9.10.68-6.el7_9 will be an update
--> Processing Dependency: urw-base35-fonts for package: ImageMagick-6.9.10.68-6.el7_9.x86_64
--> Processing Dependency: libopenjp2.so.7()(64bit) for package: ImageMagick-6.9.10.68-6.el7_9.x86_64
--> Running transaction check
---> Package ImageMagick.x86_64 0:6.7.8.9-15.el7_2 will be updated
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
---> Package ImageMagick-devel.x86_64 0:6.7.8.9-15.el7_2 will be updated
---> Package ImageMagick-devel.x86_64 0:6.9.10.68-6.el7_9 will be an update
---> Package openjpeg2.x86_64 0:2.3.1-3.el7_7 will be installed
---> Package urw-base35-fonts.noarch 0:20170801-10.el7 will be obsoleting
--> Processing Dependency: urw-base35-fonts-common = 20170801-10.el7 for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-z003-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-standard-symbols-ps-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-p052-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-nimbus-sans-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-nimbus-roman-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-nimbus-mono-ps-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-gothic-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-d050000l-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-c059-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
--> Processing Dependency: urw-base35-bookman-fonts for package: urw-base35-fonts-20170801-10.el7.noarch
---> Package urw-fonts.noarch 0:2.4-16.el7 will be obsoleted
--> Running transaction check
---> Package ImageMagick.x86_64 0:6.7.8.9-15.el7_2 will be updated
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
---> Package urw-base35-bookman-fonts.noarch 0:20170801-10.el7 will be installed
--> Processing Dependency: xorg-x11-server-utils for package: urw-base35-bookman-fonts-20170801-10.el7.noarch
--> Processing Dependency: xorg-x11-server-utils for package: urw-base35-bookman-fonts-20170801-10.el7.noarch
---> Package urw-base35-c059-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-d050000l-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-fonts-common.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-gothic-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-nimbus-mono-ps-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-nimbus-roman-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-nimbus-sans-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-p052-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-standard-symbols-ps-fonts.noarch 0:20170801-10.el7 will be installed
---> Package urw-base35-z003-fonts.noarch 0:20170801-10.el7 will be installed
--> Running transaction check
---> Package ImageMagick.x86_64 0:6.7.8.9-15.el7_2 will be updated
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
---> Package xorg-x11-server-utils.x86_64 0:7.7-20.el7 will be installed
--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXrandr.so.2()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXmuu.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXmu.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXinerama.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXi.so.6()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Processing Dependency: libXcursor.so.1()(64bit) for package: xorg-x11-server-utils-7.7-20.el7.x86_64
--> Running transaction check
---> Package ImageMagick.x86_64 0:6.7.8.9-15.el7_2 will be updated
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php56w-pecl-imagick-3.4.3-1.w7.x86_64
---> Package libXcursor.x86_64 0:1.1.15-1.el7 will be installed
---> Package libXi.x86_64 0:1.7.9-1.el7 will be installed
---> Package libXinerama.x86_64 0:1.1.3-2.1.el7 will be installed
---> Package libXmu.x86_64 0:1.1.2-2.el7 will be installed
---> Package libXrandr.x86_64 0:1.5.1-2.el7 will be installed
---> Package libXxf86misc.x86_64 0:1.0.3-7.1.el7 will be installed
--> Finished Dependency Resolution
Error: Package: php56w-pecl-imagick-3.4.3-1.w7.x86_64 (@webtatic)
Requires: libMagickCore.so.5()(64bit)
Removing: ImageMagick-6.7.8.9-15.el7_2.x86_64 (@base)
libMagickCore.so.5()(64bit)
Updated By: ImageMagick-6.9.10.68-6.el7_9.x86_64 (updates)
Not found
Error: Package: php56w-pecl-imagick-3.4.3-1.w7.x86_64 (@webtatic)
Requires: libMagickWand.so.5()(64bit)
Removing: ImageMagick-6.7.8.9-15.el7_2.x86_64 (@base)
libMagickWand.so.5()(64bit)
Updated By: ImageMagick-6.9.10.68-6.el7_9.x86_64 (updates)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Need help to resolve this issue.

User avatar
TrevorH
Site Admin
Posts: 33221
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Error Package php56w-pecl-imagick-3.4.3-1.w7.x86_64

Post by TrevorH » 2023/12/14 17:53:41

You have a - now dead - third party yum repository called webtatic installed and enabled and it is attempting to pick packages from that instead of from the CentOS repos.

This - php56w-pecl-imagick-3.4.3-1.w7.x86_64 - and any other packages that start php56w are from webtatic and should not be used. I would thoroughly recommend disabling or uninstalling the webtatic repo as it was never a good one and has been unsupported even by webtatic for several years.

You may want to install and run a utility called `keychecker` from the EPEL yum repo. That will show you all your installed packages and group them by the package signing GPG key so you know what was installed from where. Anything from webtatic should be replaced. Running yum list installed php56w\* may show you if you already have any of their php 5.6 packages installed.

In an aside, all php versions prior to 8.1 are now end of life and unsupported *except* the one from the CentOS base/updates repo which is version 5..4.16 which is still supported by Red Hat for important and critical security problems. It is now the only supported php version still available for CentOS 7 as far as I know. I do not know of anyone that supplies php 8.x packages for CentOS 7 as it's just too old to allow them to build due to missing pre-requisites of a new enough version.
Error: Package: php56w-pecl-imagick-3.4.3-1.w7.x86_64 (@webtatic)
Requires: libMagickCore.so.5()(64bit)
Removing: ImageMagick-6.7.8.9-15.el7_2.x86_64 (@base)
libMagickCore.so.5()(64bit)
Updated By: ImageMagick-6.9.10.68-6.el7_9.x86_64 (updates)
This appears to show that you already have php56w-pecl-imagick-3.4.3-1.w7.x86_64 installed and it depends on a very old version of ImageMagick. The newer php72 SCL packages you are trying to install depend on the newer ImageMagick version that is now part of CentOS 7. So in order to install php72 it needs to update the ImageMagick version to the latest vrsion and to do that it has to uninstall the webtatic packages which depend on the old version of ImageMagick.

I cannot find any php56 packages in any CentOS 7 repo. It went EOL on 31 Dec 2018 so you are running code that has 5 years of unpatched security problems. It's not safe to use and you should migrate to a newer version. If you can find one!

Since CentOS 7 dies in about 6 months time I would recommend that you set up a new system running a much newer distro and migrate all your sites to that. You will not get php 5.6 anywhere for any supported operating system. It's dead and has been for 5 years. You will also find that php 7.2 died 3 years ago, php 7.3 2 years ago and php 7.4 died 1 year ago. None of those should be used either. In addition php 8.1 died about 3 weeks ago and 8.1 will follow around this time next year.

The one version of php 5 that still remains supported on CentOS 7 (until next year) is php 5.4.16 and that is the only "safe" version to run.

Edit: you may want to look at https://rpms.remirepo.net/enterprise/7/ which has php versions for CentOS 7 up to 8.3. I have no idea if Remi backports security fixes to old unsupported versions so you may want to join his forum/IRC channel and ask him. He maintains the php stack for RHEL and these will be a sideline he does in his spare time.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
remirepo
Posts: 447
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: Failed to install php Imagick extension

Post by remirepo » 2023/12/15 07:00:39

> I have no idea if Remi backports security fixes to old unsupported versions

@TrevorH : Yes, see https://github.com/remicollet/php-src-security
Remi's Repository - Forum - Blog

User avatar
TrevorH
Site Admin
Posts: 33221
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Failed to install php Imagick extension

Post by TrevorH » 2023/12/15 10:48:12

Thanks Remi.

OP, I would also add that if your system has that ancient copy of ImageMagick installed then it's very like that it's missing lots of other critical updates to fix security issues. You should almost certainly run yum update and see what is being offered to you. There are security updates issued all the time and it is important that you apply them in order to stay secure.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply