使用PHP 7.0的Ubuntu 14.04上的ImageMagick

I have been going around in circles trying to find the correct combination to install Imagick on a Bitnami image running Ubuntu 14.04 and PHP 7.0.

If I try using sudo pecl install imagick, then the build fails with

/tmp/pear/temp/imagick/php_imagick_defs.h:29:31: fatal error: wand/MagickWand.h: No such file or directory
 #  include <wand/MagickWand.h>

I have tried to install with sudo apt-get install imagemagick and then do get an imagick,so that I can include it in my php.ini. However, when I try to use it, I see the following in PHP info and am obviously unable to process anything:

imagemagick number of supported formats 0

After a half day lost trying to do what I thought would take a few minutes, I am reaching out for any and all advice!

Thanks

In Ubuntu

1st method:

First install imagemagick

sudo apt install imagemagick

and then install the php-imagick

sudo apt install php-imagick

now restart your web server.

2nd method (using pecl):

Run

sudo apt install libmagickwand-dev imagemagick php-dev

sudo pecl install imagick

now restart your web server.

To install php-imagick for specific version, use

sudo apt-get install php[version]-imagick

So in this case, it should be

sudo apt-get install php7-imagick