Class imagick not found when ran from CLI
问题 $im = new imagick($file); 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... Class 'imagick' not found Any ideas why it won't work from CLI? 回答1: Found a solution: 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/ 回答2: The php