gpt4 book ai didi

php - Amazon ec2 linux Imagemagick 问题

转载 作者:可可西里 更新时间:2023-11-01 00:59:27 24 4
gpt4 key购买 nike

命令:转换 |头-n 4显示这个

Version: ImageMagick 6.7.8-9 2014-05-12 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC Features: OpenMP

然后当我运行这个时:

<?php 
$imagick = new Imagick();
$imagick->readImage('test.pdf');
$imagick->writeImages('image.jpg', false);
echo 'Aw';
?>

显示此错误:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.6/modules/imagick.so' - /usr/lib64/php/5.6/modules/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Fatal error: Class 'Imagick' not found in /var/www/html/test/imagick/index.php on line 2

我添加了 extension=imagick.so 到我的

etc/php.ini

etc/php-5.6.ini

etc/php-5.5.ini

我在测试的时候总是先执行这个 sudo service httpd restart

我的引用:https://gist.github.com/ARolek/9199329

最佳答案

试试这个

yes | yum install kernel-devel gcc gcc-c++
yes | yum install php-devel
yum install php-pear # This line installs pecl as well as pear
yum install ImageMagick-devel
pecl install imagick
Add extension-imagick.so to /etc/php.ini
service httpd restart

关于php - Amazon ec2 linux Imagemagick 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31625316/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com