How to install php extension ext-imagick

Hi Guys,

I am trying to run this command:
php composer.phar install

and the output is:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested PHP extension ext-imagick * is missing from your system. Install or enable PHP’s imagick extension.

I have installed the packages:

swupd bundle-list | grep php
php-basic
php-extras

Can you please help me with this?

Thank You,

Catalin

Hi,
php-imagick package is included in php-extras bundle. You also need to enable this extension in php.ini for composer to use it

2 Likes

That’s correct - the php-extras bundle adds a few more php modules. If you have need for more php extensions, please ask, and we’ll add them!

2 Likes

Thank you so much for the quick reply and sorry for another noob question…where is php.ini located in Clear Linux? The only one I found is this one: /usr/share/defaults/php/php/ini and I think this is not the one I should change.

Thank you for the reply and the good news that I can ask for what I need! I will be making a list of what other things I cannot find and get back to you soon!

Copy that file to /etc/php.ini and then modify that, that should work (file a bug if it doesn’t!).

1 Like

Also you can read

to know about stateless on CL

1 Like

Thank you guys! will try soon

Did you solve it, I cant get it working yet

In my case I was able to resolve it this way (33460):

swupd bundle-add php-extras
mkdir -p /etc/php.d
cp /usr/share/defaults/php/php.ini /etc/php.d
echo "extension=imagick.so" >> /etc/php.d/php.ini

Make sure to always refer to the documentation for up to date steps :slight_smile:.