2
votes

System - CentOS 7.5.1804

PHP Version - 7.0.3

So, I'm trying to install Imagick in order to be able to render/make an image off the first page of a PDF.

I'm tried to understand how it is setup, but I'm missing something, so I'll reproduce what I've and what I've got so far:

After a long list of errors, I got down to these 4 instalations:

sudo rpm -Uvh ImageMagick-7.0.8-9.x86_64.rpm
sudo rpm -Uvh ImageMagick-libs-7.0.8-9.x86_64.rpm 
sudo yum install php70-php-pecl-imagick.x86_64
sudo php go-pear.phar

When I'm trying to run this: sudo /usr/bin/pecl install imagick, it's giving me the following error:

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update downloading imagick-3.4.3.tgz ... Starting to download imagick-3.4.3.tgz (245,410 bytes) ............................................done: 245,410 bytes 19 source files, building running: phpize Can't find PHP headers in /usr/include/php The php-devel package is required for use of this command. ERROR: `phpize' failed

So, after checking that 'php-devel' is somewhat not here, I try to install it and I get this:

Error: Package: php-pecl-jsonc-devel-1.3.10-2.el7.remi.5.6.x86_64 (remi-php56) Requires: php-pecl-jsonc(x86-64) = 1.3.10-2.el7.remi.5.6 Available: php-pecl-jsonc-1.3.10-1.el7.remi.5.6.x86_64 (remi-php56) php-pecl-jsonc(x86-64) = 1.3.10-1.el7.remi.5.6

Error: Package: php-pecl-jsonc-1.3.10-2.el7.remi.5.6.x86_64 (remi-php56)

Requires: php(zend-abi) = 20131226-64

Installed: php-common-7.0.31-1.el7.remi.x86_64 (@remi-php70) php(zend-abi) = 20151012-64 Available: php-common-5.4.16-45.el7.x86_64 (base) php(zend-abi) = 20100525-64 Available: php-common-5.6.36-1.el7.remi.x86_64 (remi-php56) php(zend-abi) = 20131226-64 Available: php-common-5.6.37-1.el7.remi.x86_64 (remi-php56) php(zend-abi) = 20131226-64

Error: Package: php-devel-5.6.37-1.el7.remi.x86_64 (remi-php56)

Requires: php-cli(x86-64) = 5.6.37-1.el7.remi

Installed: php-cli-7.0.31-1.el7.remi.x86_64 (@remi-php70) php-cli(x86-64) = 7.0.31-1.el7.remi Available: php-cli-5.4.16-45.el7.x86_64 (base) php-cli(x86-64) = 5.4.16-45.el7 Available: php-cli-5.6.36-1.el7.remi.x86_64 (remi-php56) php-cli(x86-64) = 5.6.36-1.el7.remi Available: php-cli-5.6.37-1.el7.remi.x86_64 (remi-php56) php-cli(x86-64) = 5.6.37-1.el7.remi

Error: Package: php-pecl-jsonc-1.3.10-2.el7.remi.5.6.x86_64 (remi-php56)

Requires: php(api) = 20131106-64

Installed: php-common-7.0.31-1.el7.remi.x86_64 (@remi-php70) php(api) = 20151012-64 Available: php-common-5.4.16-45.el7.x86_64 (base) php(api) = 20100412-64 Available: php-common-5.6.36-1.el7.remi.x86_64 (remi-php56) php(api) = 20131106-64 Available: php-common-5.6.37-1.el7.remi.x86_64 (remi-php56) php(api) = 20131106-64

What am I doing wrong/what am I missing?

2
Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Server Fault or Webmaster Stack Exchange would be a better place to ask.jww

2 Answers

1
votes

you can use remi php repositories to easily install and maintain your server.

first download the remi-release rpm file from address below :

http://remi.schlundtech.de/enterprise/remi-release-7.rpm

then, run :

sudo rpm -Uvh remi-release-7.rpm

edit file remi.repo : sudo vim /etc/yum.repos.d and make sure that the value of enabled in section [remi] is 1.

[remi]
#some configurations
enabled=1

now with this command you can install every version of php with any extention you need.

sudo yum install php70-php php70-php-imagick

0
votes

For me running

yum install ImageMagick ImageMagick-devel

and then running

pecl install imagick

solved the issue. I'm using CentOS 7 server.