Installing Imagick extension for PHP in Ubuntu 7.10

16 thoughts on “Installing Imagick extension for PHP in Ubuntu 7.10”

  1. Probably version conflicts.. ubuntu comes with imagemagic 6.2.x in edgy and hardy (for now). You have 6.3.x.

    But installing the official php5-package for imagick extension worked just fine for me, it is however an older version: (This is hardy, edgy is similar, just an older verson.. 2.0.0-alpha)

    ~$ sudo apt-get install php5-imagick
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut
    Reading state information… Fertig
    The following packages were automatically installed and are no longer required:
    libfftw3-3
    Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
    Die folgenden NEUEN Pakete werden installiert:
    php5-imagick
    0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    Es müssen 84.0kB Archive geholt werden.
    After this operation, 397kB of additional disk space will be used.
    Hole:1 http://archive.ubuntu.com hardy/universe php5-imagick 2.0.1-1 [84.0kB]
    Es wurden 84.0kB in 0s geholt (252kB/s)
    Wähle vormals abgewähltes Paket php5-imagick.
    (Lese Datenbank … 155696 Dateien und Verzeichnisse sind derzeit installiert.)
    Entpacke php5-imagick (aus …/php5-imagick_2.0.1-1_amd64.deb) …
    Richte php5-imagick ein (2.0.1-1) …

    Creating config file /etc/php5/conf.d/imagick.ini with new version

    $ php -i | grep imagick
    additional .ini files parsed => /etc/php5/cli/conf.d/imagick.ini,
    imagick
    imagick module => enabled
    imagick module version => 2.0.1
    imagick classes => Imagick, ImagickDraw, ImagickPixel

  2. The better way to install the pecl package is:

    $ sudo pecl upgrade imagick
    or
    $ sudo pecl install imagick

    Just like using PEAR, you can choose stable, beta or alpha packages.

    I had a similar problem with Ubuntu’s php5-imagick package, uninstalled and grabbed the PECL package, which works well and gives me access to all the latest methods.

    I found some problems with restarting Apache after upgrading Imagick:

    $ sudo apache2ctl configtest
    Syntax OK
    $ sudo apache2ctl restart
    $ ps -ef | grep apache
    james 12282 9338 0 09:31 pts/4 00:00:00 grep apache
    $ sudo apache2ctl start
    $ ps -ef | grep apache
    root 12328 1 6 09:31 ? 00:00:00 /usr/sbin/apache2 -k start

    Here is what apache error log says for the above, snipped for brevity:
    [Thu Feb 07 09:31:12 2008] [notice] SIGHUP received. Attempting to restart
    [Thu Feb 07 09:31:12 2008] [notice] seg fault or similar nasty error detected in the parent process
    [Thu Feb 07 09:31:23 2008] [warn] pid file /var/run/apache2.pid overwritten — Unclean shutdown of previous Apache run?
    [Thu Feb 07 09:31:23 2008] [notice] Apache/2.2.4 (Ubuntu) configured — resuming normal operations

  3. @Mikko

    I tried installing graphicsmagick-libmagick-dev-compat but libmagick9-dev, because afaik Wand_config was available to both these packages. It installed suucessfully but when I tried to compile Imagick extension, it ends up with the same error magic_wand.h not found.

    Thanks for the info.

  4. PHP Warning: PHP Startup: Unable to load dynamic library ‘…/imagick.so’ – …/imagick.so: undefined symbol: XStringListToTextProperty in Unknown on line 0 la soulucion en suse fue la instalacion de rc2e
    luego el proceso nomarl de instalcion
    pecl install imagick

    cuando pida la ruta coloca la ruta de extencion de php
    /usr/php5/extencion/

    ….
    en la carpeta de imagick ejecuta lo siguiente
    ….
    #phpize
    #./configure
    ….
    service apache2 stop
    service apache2 start

    en el php.ini
    extencion=imagick.so

  5. Hi! (sorry my english 🙂

    I have problem with imagick install.

    I have done this:
    – install libmagick9, libmagic9-dev
    – download ImageMagick 6.5,Imagick-2.3
    -I have compiled ImageMagic and install
    – I have compiled Imagick and install
    – add .so to my php.ini file

    I see this in phpinfo() output:

    imagick module enabled
    imagick module version 2.3.0
    imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
    etc.

    It seems to be ok, but when I try call a imageick function i get this error message:
    Class ‘Imagick’ not found in …

    What can I do?

    Thx,
    cyrip

  6. hi,

    your technique was helpful to me and it worked.
    previously i was trying to do

    pecl install imagick

    but it was not doing the needful.

    thanks to you for writing this technique here.

    Farrukh.

Leave a comment