MyTetra Share
Делитесь знаниями!
PHP 7 - Installing imagick on Ubuntu 14.04
Время создания: 13.07.2018 15:30
Текстовые метки: php php7 imagick ubuntu 14.04
Раздел: PHP


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

Install dependencies

$ 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

Download extension

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

Unzip it:

$ unzip

Cd into it

$ cd imagick-phpseven

Make extension

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 "" | 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


MyTetra Share v.0.53
Яндекс индекс цитирования