[英]php error installing imagick
System - CentOS 7.5.1804系统 - CentOS 7.5.1804
PHP Version - 7.0.3 PHP 版本 - 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.因此,我正在尝试安装 Imagick,以便能够从 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:经过一长串错误后,我得到了这 4 个安装:
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:当我尝试运行它时:
sudo /usr/bin/pecl install imagick
,它给了我以下错误:
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.
警告:频道“pecl.php.net”已更新其协议,使用“pecl channel-update pecl.php.net”更新下载 imagick-3.4.3.tgz ... 开始下载 imagick-3.4.3.tgz (245,410 字节) .....................................完成: 245,410 字节 19 个源文件,构建运行:phpize 在 /usr/include/php 中找不到 PHP 头文件 使用该命令需要 php-devel 包。 ERROR: `phpize' failed
错误:`phpize' 失败
So, after checking that 'php-devel' is somewhat not here, I try to install it and I get this:因此,在检查“php-devel”不在此处后,我尝试安装它并得到以下信息:
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
错误:包:php-pecl-jsonc-devel-1.3.10-2.el7.remi.5.6.x86_64 (remi-php56) 需要:php-pecl-jsonc(x86-64) = 1.3.10-2.el7 .remi.5.6 可用: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)
错误:包:php-pecl-jsonc-1.3.10-2.el7.remi.5.6.x86_64 (remi-php56)
Requires: php(zend-abi) = 20131226-64
要求: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
已安装:php-common-7.0.31-1.el7.remi.x86_64 (@remi-php70) php(zend-abi) = 20151012-64 可用:php-common-5.4.16-45.el7.x86_64 (base ) php(zend-abi) = 20100525-64 可用:php-common-5.6.36-1.el7.remi.x86_64 (remi-php56) php(zend-abi) = 20131226-64 可用: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)
错误:包:php-devel-5.6.37-1.el7.remi.x86_64 (remi-php56)
Requires: php-cli(x86-64) = 5.6.37-1.el7.remi
要求: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
已安装:php-cli-7.0.31-1.el7.remi.x86_64 (@remi-php70) php-cli(x86-64) = 7.0.31-1.el7.remi 可用:php-cli-5.4.16 -45.el7.x86_64 (base) php-cli(x86-64) = 5.4.16-45.el7 可用:php-cli-5.6.36-1.el7.remi.x86_64 (remi-php56) php-cli (x86-64) = 5.6.36-1.el7.remi 可用: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)
错误:包:php-pecl-jsonc-1.3.10-2.el7.remi.5.6.x86_64 (remi-php56)
Requires: php(api) = 20131106-64
要求: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
已安装:php-common-7.0.31-1.el7.remi.x86_64 (@remi-php70) php(api) = 20151012-64 可用:php-common-5.4.16-45.el7.x86_64 (base) php (api) = 20100412-64 可用:php-common-5.6.36-1.el7.remi.x86_64 (remi-php56) php(api) = 20131106-64 可用: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?我做错了什么/我错过了什么?
you can use remi php repositories to easily install and maintain your server.您可以使用 remi php 存储库轻松安装和维护您的服务器。
first download the remi-release rpm file from address below :首先从以下地址下载remi-release rpm文件:
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.repo
: sudo vim /etc/yum.repos.d
并确保[remi]
部分中enabled
的值为1
。
[remi]
#some configurations
enabled=1
now with this command you can install every version of php with any extention you need.现在,使用此命令,您可以安装所需的任何扩展名的每个版本的 php。
sudo yum install php70-php php70-php-imagick
For me running为我跑步
yum install ImageMagick ImageMagick-devel
and then running然后运行
pecl install imagick
solved the issue.解决了这个问题。 I'm using CentOS 7 server.
我正在使用 CentOS 7 服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.