【发布时间】:2017-09-30 06:08:34
【问题描述】:
我只是为了将 imagick 添加到 php 中而将我的整个运行系统搞砸是对的,所以这就是我所在的位置。我想使用 yum 安装,我启用了 remi55 并加载了所有必要的
php版本
$php -v
PHP 5.5.34 (cli) (built: Mar 29 2016 19:27:57)
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
gcc 已安装
Package gcc-4.4.7-18.el6.x86_64 already installed and latest version
imagemagick 和 imagemagick-devel 已安装
Package ImageMagick-6.7.2.7-6.el6.x86_64 already installed and latest version
Package ImageMagick-devel-6.7.2.7-6.el6.x86_64 already installed and latest version
php-devel 好像已经安装了
Package php55-php-devel-5.5.38-7.el6.remi.x86_64 already installed and latest version
我安装了更多的东西
Package php55-php-pecl-imagick-3.4.3-1.el6.remi.x86_64 already installed
php55-php-pecl-xdebug.x86_64 0:2.5.3-2.el6.remi already installed
我不知道尝试了很多,但是当涉及到
pecl install imagick
我得到一个错误
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
好吧,我尝试yum install php-devel,即使我知道我的 php 版本有 php-devel,但我收到以下错误:
--> Finished Dependency Resolution
Error: Package: php-pecl-jsonc-1.3.10-2.el6.remi.5.5.x86_64 (remi-php55)
Requires: php(zend-abi) = 20121212-64
Removing: php-common-5.5.34-1.el6.remi.x86_64 (@remi-php55)
php(zend-abi) = 20121212-64
Updated By: php-common-5.6.30-2.el6.remi.x86_64 (remi-test)
php(zend-abi) = 20131226-64
Available: php-common-5.3.3-49.el6.x86_64 (base)
php(zend-abi) = 20090626
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php(zend-abi) = 20100525-x86-64
Available: php-common-5.5.38-6.el6.remi.x86_64 (remi-php55)
php(zend-abi) = 20121212-64
Available: php-common-5.5.38-7.el6.remi.x86_64 (remi-php55)
php(zend-abi) = 20121212-64
Available: php-common-5.6.30-0.1.RC1.el6.remi.x86_64 (remi-test)
php(zend-abi) = 20131226-64
Error: Package: php-pecl-jsonc-1.3.10-2.el6.remi.5.5.x86_64 (remi-php55)
Requires: php(api) = 20121113-64
Removing: php-common-5.5.34-1.el6.remi.x86_64 (@remi-php55)
php(api) = 20121113-64
Updated By: php-common-5.6.30-2.el6.remi.x86_64 (remi-test)
php(api) = 20131106-64
Available: php-common-5.3.3-49.el6.x86_64 (base)
php(api) = 20090626
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php(api) = 20100412-x86-64
Available: php-common-5.5.38-6.el6.remi.x86_64 (remi-php55)
php(api) = 20121113-64
Available: php-common-5.5.38-7.el6.remi.x86_64 (remi-php55)
php(api) = 20121113-64
Available: php-common-5.6.30-0.1.RC1.el6.remi.x86_64 (remi-test)
php(api) = 20131106-64
Error: Package: php-pecl-zip-1.14.0-1.el6.remi.5.5.x86_64 (remi-php55)
Requires: php(zend-abi) = 20121212-64
Removing: php-common-5.5.34-1.el6.remi.x86_64 (@remi-php55)
php(zend-abi) = 20121212-64
Updated By: php-common-5.6.30-2.el6.remi.x86_64 (remi-test)
php(zend-abi) = 20131226-64
Available: php-common-5.3.3-49.el6.x86_64 (base)
php(zend-abi) = 20090626
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php(zend-abi) = 20100525-x86-64
Available: php-common-5.5.38-6.el6.remi.x86_64 (remi-php55)
php(zend-abi) = 20121212-64
Available: php-common-5.5.38-7.el6.remi.x86_64 (remi-php55)
php(zend-abi) = 20121212-64
Available: php-common-5.6.30-0.1.RC1.el6.remi.x86_64 (remi-test)
php(zend-abi) = 20131226-64
Error: Package: php-pecl-zip-1.14.0-1.el6.remi.5.5.x86_64 (remi-php55)
Requires: php(api) = 20121113-64
Removing: php-common-5.5.34-1.el6.remi.x86_64 (@remi-php55)
php(api) = 20121113-64
Updated By: php-common-5.6.30-2.el6.remi.x86_64 (remi-test)
php(api) = 20131106-64
Available: php-common-5.3.3-49.el6.x86_64 (base)
php(api) = 20090626
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php(api) = 20100412-x86-64
Available: php-common-5.5.38-6.el6.remi.x86_64 (remi-php55)
php(api) = 20121113-64
Available: php-common-5.5.38-7.el6.remi.x86_64 (remi-php55)
php(api) = 20121113-64
Available: php-common-5.6.30-0.1.RC1.el6.remi.x86_64 (remi-test)
php(api) = 20131106-64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
所以我真的疯了,我现在不知道该怎么办?! 我最不想做的是“全部删除并从头开始安装”,正如我所说,我有一个包含许多站点的工作系统,所以如果你有任何想法,请告诉我,确定我尝试重新启动 httpd
我知道我可能没有提供所有必需的信息,但我不想 tldr;
毕竟php -m | grep image
什么都不返回
这是 php -m 的完整输出
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Phar
posix
readline
recode
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
【问题讨论】:
-
Package php55-php-pecl-imagick-3.4.3-1.el6.remi.x86_64 already installed-- 应该这样做。运行php -m并查看 imagick 是否在输出中。 -
不,不幸的是它不是:*(我添加了 php -m 的输出
-
运行
rpm -ql php55-php-pecl-imagick-3.4.3-1.el6.remi.x86_64以获取该包中的文件列表。其中之一应该是imagick.so -
绝对正确!它位于
/opt/remi/php55/root/usr/lib64/php/modules/imagick.so我是否必须将其引用到 httpd.conf 中? 'LoadModule imagick {path}' 的确切名称是什么? -
确保您的
php.ini包含extension = imagick.so。