Score:0

Issue downloading imagick php module for php 7.3 in ubuntu

hk flag

in my laravel app I use laravel intervention image, I want to use imagick driver instrad of gd.

In my ubuntu server I use php 7.3, for example when I do php -ini I get the following:

/etc/php/7.3/cli

Along with the following error , probably about a mismatched php-imagick version

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20170718/imagick.so' (tried: /usr/lib/php/20170718/imagick.so (/usr/lib/php/20170718/imagick.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/20180731//usr/lib/php/20170718/imagick.so.so (/usr/lib/php/20180731//usr/lib/php/20170718/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

I download php-imagick using this command:

sudo apt-get install php-imagick

When I install php-imagick with this command:

sudo apt-get install php-imagick

I get this logs , As you can see the version being installed is for php7.2 while I use php7.3

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  php-imagick
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/90.7 kB of archives.
After this operation, 477 kB of additional disk space will be used.
Selecting previously unselected package php-imagick.
(Reading database ... 103072 files and directories currently installed.)
Preparing to unpack .../php-imagick_3.4.3~rc2-2ubuntu4.1_amd64.deb ...
Unpacking php-imagick (3.4.3~rc2-2ubuntu4.1) ...
Setting up php-imagick (3.4.3~rc2-2ubuntu4.1) ...
Processing triggers for php7.2-phpdbg (7.2.24-0ubuntu0.18.04.17) ...
Processing triggers for php7.2-cli (7.2.24-0ubuntu0.18.04.17) ...

I also edited my php.ini file with command sudo nano /etc/php/7.3/cli/php.ini, I tried with:

extension=imagick.so

and

extension=/usr/lib/php/20170718/imagick.so

But I still can't get php to recognize php-imagick module, I tried to download with command bellow but it says its : Unable to locate package php7.3-imagick

sudo apt-get install php7.3-imagick

And when I try to find where imagick is installed I use sudo find /usr -name imagick.so

and get the following:

/usr/lib/php/20170718/imagick.so

```
guiverc avatar
cn flag
Ubuntu 18.04 is EOSS (*end-of-standard-support*) thus off-topic on this site (refer https://askubuntu.com/help/on-topic) unless your question is specifically about moving to a *fully supported* release of Ubuntu. Being EOSS, mirrors can drop the release. Refer https://help.ubuntu.com/community/EOLUpgrades https://fridge.ubuntu.com/2023/06/17/extended-security-maintenance-for-ubuntu-18-04-lts-began-on-may-31-2023/
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.