- Published on
Class 'Imagick' Not Found
- Authors

- Name
- Kevin van Zonneveld
- @kvz
I tried to do some Image Magick with PHP recently on an Ubuntu
Feisty machine, and even though I had the required package: 'php5-imagick'
installed, and I updated my php.ini with imagick.so, I kept getting the
error Class 'Imagick' not found. This is how I eventually fixed it.
The idea is to fall back to the good old PECL installation:
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
And don't forget to put your imagick.so in your php.ini!
Well, that did it for me. No need for a long article this time, but this may help others experiencing similar problems.
Legacy Comments (25)
These comments were imported from the previous blog system (Disqus).
Worked great on 8.04 x64. Thank you :)
This saved my coffe break :)
Thanks!
i have the same prob on a windows machine. any idea how to fix it ?
@ tony: Can\'t you use PECL on windows as well? I always believed it was platform independent.
That\'s ingenious!
it help me a lot.
worked fine here too . (fresh hardy install) thanks for the tip!
@ jf: Thanks for sharing!
we had the same problem on debian etch - your solution worked perfectly - thanks!
I got the same error while uploading images with the imagick.
Lets hope this can solve my problem!
Thank you.
Works fine here tool! Thanks alot! :)
great post.. it helped me solve the problem on debian etch.. thanks a lot..!
Made me look like I actually knew what I was doing! Thanks
this worked perfectly for me too, thank you very much.
great post..check this one as well
Thank you, it works perfectly !
Thank you Kevin. I had this problem on Debian ETCH, php5
thanks. for other readers, you may also need to install php5-dev if youre getting pecl errors.
* via apt-get
Brilliant, thanks!
Thanks for this article.. This lines solve my problems!
How does one enter the binary information in PHP script as my web site provider does compile IM with PHP. I have it installed on the server but need to reference the installation location in PHP somehow. Any clues?
@ Marek: That sounds very specific and you should just take it up with your provider.
Great work. This article help me to sort the issue.
I tried the listed commands, and double checked that php5-dev was installed and:
# pecl install imagick
...
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
ERROR: `phpize' failed
thanks!