Install Ubuntu imagick

Source: Internet
Author: User
To install the latest Imagick from PECL on an Ubuntu variant system, assuming your already have PHP5 and Apache2 installed, do the following.
You need your root password, have sudo privileges and be able to run commands from a shell (e.g via Konsole)

1. $ sudo aptitude install php-pear imagemagick php5-dev libmagick9-dev
2. do *not* install php5-imagick as you will install a later version from PECL
3. libmagick9-dev may install a whole load of dependencies. This package provides the Wand-config program and avoids the error on pecl install "configure: error: not found. Please provide a path to MagickWand-config or Wand-config program."
4. $ sudo pecl install Imagick
5. Hit enter to autodetect the "Imagemagick installation" prefix

You should see some compilation messages, noting any errors that stop the Imagick build.

When completed successfully, the following console message should appear

Build process completed successfully
Installing '/usr/lib/php5/20060613+lfs/imagick.so'
install ok: channel://pecl.php.net/imagick-2.2.0b2

Now for loading it when the web server starts/restarts
6. $ sudo vi /etc/php5/apache2/conf.d/php.ini

7. enter extension=imagick.so and save
8. $ sudo apache2ctl configtest
9. $ sudo apache2ctl restart

Notes:
* You can use any apt client e.g apt-get to install packages
* If you want beta Imagick then:
$ sudo pear config-set preferred_state beta
* You can now upgrade Imagick as new versions are made available in PECL the same way PEAR updates are handled.
See more in http://www.wemaster.com.cn/blog? P = 32

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.