从CLI运行时找不到类imagick [英] Class imagick not found when ran from CLI
本文介绍了从CLI运行时找不到类imagick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$im = new imagick($file);
从我的浏览器运行时,这行代码可以正常工作,但是当我尝试从命令行(CLI)然后我得到以下错误...
This line of code will work fine when ran from my browser, but when I try to run it from command line (CLI) then I get the following error...
未找到类'imagick'
Class 'imagick' not found
为什么它不能从CLI工作的任何想法?
Any ideas why it won't work from CLI?
推荐答案
找到解决方案:
sudo aptitude install make php5-dev php-pear
sudo aptitude remove php5-imagick
sudo aptitude install libmagick9-dev
sudo pecl install imagick
sudo /etc/init.d/apache2 restart
http:// kvz.io/blog/2008/02/27/class-imagick-not-found/
这篇关于从CLI运行时找不到类imagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文