1

我正在尝试在 whm 中安装 imagemagick 和 imagick 模块。我安装了 imagemagick 没有任何问题,但是通过 whm 安装 imagick 时,我收到以下错误:

downloading imagick-3.0.1.tgz ...
Starting to download imagick-3.0.1.tgz (Unknown size)
....done: 3,582 bytes
Could not get contents of package "/root/tmp/pear/cache/imagick-3.0.1.tgz". Invalid tgz file.
Download of "pecl/imagick" succeeded, but it is not a valid package archive
Error: cannot download "pecl/imagick"
Download failed
install failed
The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626

有人可以帮忙吗?

4

2 回答 2

2

看起来http://pecl.php.net已关闭!所以我所做的是从谷歌代码网站下载包并手动安装。

cd /usr/src/
wget http://acelnmp.googlecode.com/files/imagick-3.0.1.tgz
tar -xvf imagick-3.0.1.tgz
cd imagick-3.0.1
phpize
./configure
make
make install

然后在 php.ini 上添加扩展并重新启动服务器:

echo "extension=imagick.so" >> /usr/local/lib/php.ini 
service httpd restart
于 2011-12-29T07:27:03.617 回答
0

原来 make 没有为我安装。尝试:

yum groupinstall “开发工具”

于 2015-08-05T15:26:43.720 回答