Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is
$ sudo apt-get install php-imagick
, and you're done. I'll keep the guide here because a lot of it is still true for other extensions
======
I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating
$ sudo apt-get install php7.0-dev
$ sudo apt-get install pkg-config
$ sudo apt-get install libmagickwand-dev
$ sudo apt-get install imagemagick
$ sudp apt-get install build-essential
# Or
$ sudo apt-get install -y php7.0-dev pkg-config libmagickwand-dev imagemagick build-essential
Mikko Koppanen have a PHP 7 compatible build of imagick. Be sure to download the phpseven branch (We're doing that below). I suppose you could clone the repo if you want the latest changes available more easily
I usually create a download directory for temporary downloads
mkdir downloads
$ cd downloads
$ wget https://github.com/mkoppanen/imagick/archive/phpseven.zip
Unzip it:
$ unzip phpseven.zip
Cd into it
$ cd imagick-phpseven
Phpize it
$ phpize
Configure it and run make
$ ./configure
$ make
$ sudo make install
Tell PHP about the extension (Modified steps from Fideloper's guide for sphinx)
$ echo "extension=imagick.so" | sudo tee /etc/php/mods-available/imagick.ini
# Symlink it to fpm
$ sudo ln -s /etc/php/mods-available/imagick.ini /etc/php/7.0/fpm/conf.d/20-imagick.ini
# Symlink it to cli
$ sudo ln -s /etc/php/mods-available/imagick.ini /etc/php/7.0/cli/conf.d/20-imagick.ini
# Reload php-fpm
sudo service php7.0-fpm reload
After executing these commands following error is occurred and i am using ubuntu16.04 please help me thank you! please help me
/home/desktop/download/imagick-phpseven/imagick_helpers.c: In function ‘php_imagick_progress_monitor_callable’:
/home/desktop/download/imagick-phpseven/imagick_helpers.c:96:5: error: ‘zend_fcall_info {aka struct _zend_fcall_info}’ has no member named ‘function_table’
fci.function_table = EG(function_table);
^
/home/desktop/download/imagick-phpseven/imagick_helpers.c:111:5: error: ‘zend_fcall_info {aka struct _zend_fcall_info}’ has no member named ‘symbol_table’
fci.symbol_table = NULL;
^
Makefile:204: recipe for target 'imagick_helpers.lo' failed
make: *** [imagick_helpers.lo] Error 1