The cart is empty

When attempting to install ImageMagick on CentOS 7, you might encounter an error stating that the package requires the libMagickCore.so.5()(64bit) library. This error indicates that a specific version of the MagickCore library is required for ImageMagick to function properly, which may either be unavailable or not correctly recognized on your system. The following article provides steps to resolve this issue.

Prerequisites

Before proceeding, ensure that you have administrative privileges (execute commands as root user or using sudo) and that your system is up-to-date using the command:

yum update

Step 1: Install Dependencies

The first step involves installing all necessary dependencies. ImageMagick requires a number of libraries for its functionality. Install them using:

yum install -y gcc php-devel php-pear

Step 2: Add Repository for ImageMagick

While ImageMagick may be available in the default CentOS repository, sometimes it's necessary to add a special repository that contains newer versions. The Remi repository is one of those that often offers updated packages for CentOS. Add it using:

yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Step 3: Install ImageMagick

After adding the repository, you can proceed to install ImageMagick:

yum install -y ImageMagick ImageMagick-devel

Step 4: Resolving libMagickCore Error

If you encounter the mentioned error during installation, it likely means that the required version of libMagickCore.so.5 library is missing from your system. One solution could be manually installing an older version of ImageMagick that directly requires this library or finding and installing the missing library. You can attempt to install the library directly using:

yum install -y libMagickCore.so.5

If the library is not found in available repositories, you may need to add additional repositories that contain it or download and install the library manually from official sources.

Step 5: Verify Installation

After resolving the library issue, you should verify that ImageMagick is correctly installed and functional:

convert -version

This command should display the version of ImageMagick installed along with configuration information.

 

The issue with the missing libMagickCore.so.5 library during ImageMagick installation on CentOS 7 can be caused by several factors, including version incompatibility or missing dependencies. Follow the above steps to address this problem and ensure the proper installation and functionality of ImageMagick on your system.