The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

imagemagick pecl install breaks

Discussion in 'General Discussion' started by ceynet, Jul 30, 2009.

  1. ceynet

    ceynet Member

    Joined:
    Dec 30, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    hi all,
    i'm trying to install the pecl, imagick, but it fails saying

    /root/tmp/pear/imagick/imagick_helpers.c:912: error: `AddModulusEvaluateOperator' undeclared (first use in this function)
    make: *** [imagick_helpers.lo] Error 1
    ERROR: `make' failed
    The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20060613

    how can i solve this?

    ~viraj

    further.. following is my imagemagick script outputs.. seems they are ok.

    [root@tp tmp]# /scripts/checkimagemagick
    ok
    [root@tp tmp]# /scripts/installimagemagick
    ImageMagick installed ok
    [root@tp tmp]#
     
  2. ceynet

    ceynet Member

    Joined:
    Dec 30, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    solved with support from Jamyn from cpanel

    here goes the thread..

    [root@tp ~]# convert -version
    Version: ImageMagick 6.4.8 2009-07-30 Q16 http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

    [root@tp ~]# /scripts/cleanimagemagick

    As for the imagick extension; I also had a build failure using 2.3.x.
    However, I downloaded and installed 2.2.x (from http://pecl.php.net/get/imagick-2.2.2.tgz) and it built just fine. So there's probably an issue with their code somewhere. Thanks!

    --
    [root@tp imagick-2.2.2]# make install
    Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
    [root@tp imagick-2.2.2]#
     
  3. trav91

    trav91 Registered

    Joined:
    Aug 2, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cant understand the solution

    hi sir
    how do i install the 2.2.x?

    could you elaborate on what to do first to resolve it? i am a stupid dumb noob :( thank you so much
     
  4. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
    Grab the source, unzip it then:

    perl Makefile.PL
    make
    make install


    That should install it assuming something else is not having problems.
     
  5. trav91

    trav91 Registered

    Joined:
    Aug 2, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1


    you mean via PuTTy? I'm doing it in putty bash.. :S
    shouuld i wget.. or something? I really don't know anything :(
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Yes, there is a problem with the newest imagick build but if you roll back
    to the release just before the "latest" then it will work just fine.

    I have downloaded the newest and had to manually correct a substantial
    amount of bad coding and missing file issues to get it to work correctly
    so whoever uploaded that one, really messed things up.

    However the earlier release works just fine and you don't have to do any
    manual updating or fixes to get that one to work.

    Ok, here is the basic rundown ....

    Code:
    # yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
    # cd /usr/local/src
    # wget http://pecl.php.net/get/imagick-2.2.2.tgz
    # tar zxvf ./imagick-2.2.2.tgz
    # cd imagick-2.2.2
    # phpize
    # ./configure
    # make
    # make test
    # make install
    
    That should build imagick as a loadable module and you should have a
    line setup in your /usr/local/lib/php.ini file to load the imagick extension
    like the following:
    Code:
    extension=imagick.so
    (This was probably done for you when you did 'make install' though)

    Alternate installation, you could hard compile this extention into PHP
    putting it into the /ext folder in the PHP source and using the "--with-imagick"
    configure flag but it sounds like that might be beyond what you are ready to
    do so forget I mentioned it and the loadable module should work fine for you.
     
    #6 Spiral, Aug 2, 2009
    Last edited: Aug 2, 2009
  7. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    I have followed

    and

    and adding the following to the global php.ini file

    Access via perl works great, I am not showing the extension via PHP though in phpinfo or a php imagemagick verify script.

    Any ideas?

    I have also tried via whm...

     
    #7 Solokron, Jan 7, 2010
    Last edited: Jan 7, 2010
  8. Aita

    Aita Member

    Joined:
    Sep 16, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    To install imagick > 2.2.2 one must manualy download and then edit imagick_helpers.c to coment out the code causing the error, then manualy install it.

    This is what i did to get imagick 3.0.0 to work.

    I do assume you have root access to the machine to install and compile and also that you do not have a previous pecl install of imagick

    If you have not already installed ImageMagick, install it from console by running /scripts/installimagemagick

    Download imagick 3.0.0

    cd /usr/local/src
    wget http://pecl.php.net/get/imagick-3.0.0.tgz
    tar xzf imagick-3.0.0.tgz
    cd imagick-3.0.0/

    edit imagick_helpers.c using your favorite editor and coment out the lines 952, 953, 954 (actualy you can comment out the entire preprocessor macro statement)

    phpize
    ./configure
    make
    make test
    make install

    edit /usr/local/lib/php.ini and add extension=imagick.so (add it where you other extentions are defined)

    /scripts/restartsrv_httpd

    Congratualations you now have imagick 3.0.0 :)
     
Loading...

Share This Page