A
A
Anatoly2020-02-15 01:31:01
PHP
Anatoly, 2020-02-15 01:31:01

How to install and connect imagick?

Debian 9, php 7.3, has Wordpress installed and complains that ImageMagick is not connected.
Checked through phpinfo(), really nothing.
The question is how to install and connect?

convert --version
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib


php -m | grep imagick
imagick


I wrote in php.ini: extension=imagick.so

I tried to install it like this:
apt install imagemagick php-imagick libmagickwand-dev php-pear
pecl channel-update pecl.php.net
pecl install imagick

but on the last line I got:
No releases available for package "pecl.php.net/imagick"
install failed

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly, 2020-02-15
@Tolly

The question was solved for those who are interested:
1) Reinstalled php (updated to 7.3.14), from sources
2) Connected the latest updates to Debian 9:
apt -y install lsb-release apt-transport-https ca-certificates
wget -O /etc/ apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
apt update
3) Installed the php7.3-dev package
4) After checking php and php-fpm, I realized that I have different versions, i.e. in fact, there is only one version, but one is from the package, and the other is compiled
5) I checked the connected modules
php -m and php-fpm -m
I realized that in the version of php-fpm (compiled, the one I use) there is no magick module
6) Installed the php-imagick package
7) Found the library: find / -type f -name imagick.so
8) Copied it to the extensions folder
9) Registered in php.ini: extension=imagick
10) I rejoice: php-fpm -m | grep imagick
imagick

A
Arthur Khylskyi, 2020-02-15
@ArthurPatriot

Installation (Ubuntu):
sudo apt-get install php-imagick
Check:
php -m | grep imagick
And don't forget to restart Apache)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question