Can't install imagick for php > 8.0

Hello,
I’m using Ubuntu Focal 20.04.6 and i would like to set php 8.3 for my sites.
The issue is i need either gd or imagick on my php and it doesn’t seem to be installable easily ..
It exists on php 8.0 but i can’t find how to install it on php 8.3 ..
What can i do ?
Thanks

Hello,

How did you install PHP 8.3? And how did you try to install Imagick exactly?

1 Like

As ubuntu 20.04 is eol the sury repositories no longer support it, but thing to do is get a new os ubuntu 24.04 et el which you will have no problem installing php 8.3 in fact ubuntu 24.04 ships with 8.3 as far as I remember

Hello, well PHP 8.3 and 8.4 seem to be by default with Virtualmin .. I have done nothing special to install them, I have the choice to switch between all php versions from 8.0 to 8.4 .. Even 8.4 works fine on my sites but they just lack imagick and gd .. I have tried to install them with apt install.

Yes I imagine it would be far better with a new version but as I have not planned to switch quickly and I had seen that PHP 8.3 (or .4) worked with my version, I was thinking of first making php 8 working before planning to change the OS

That’s not virtualmin’s choice it’s the os choice virtualmin will work with whichever version of php that os has access to.

We do not preinstall any additional PHP versions. If that’s been done, it’s a red flag because Virtualmin should be installed on a clean system.

You can see how to install an additional PHP version in our docs:

No, sorry I was not clear : i have been using Virtualmin on my server for years and everything is always ok.
I have the choice of choosing different versions of PHP : i don’t remember having done anything manually to get the ability to switch to the latest versions of php 8.3 so I presume it is done with the updates i can make with Virtualmin and all packages (including the Sury repository)

Here is the choice i have to switch PHP

My issue is that PHP > 8.0 have not imagick or gd installed and i would like to add them and I don’t suceed with only apt-get, they doesn’t seem to be available in the repository, is there a way i have not found ? and yes I understand that installing imagick on a specific version is not a Virtualmin task but I would love to do it without breaking anything in Virtualmin of course :slight_smile:

Why don’t you show us what you tried and what output you got? It’s better to give us more details so we can give you an exact answer sooner. :slight_smile:

My preferred method for the OP to try would be:


Note further down the list:

Debian here so it should be the same repos.

Sure, I have just tried a

apt-get update
apt-get install php8.1-imagick

and i got error

E: Unable to locate package php8.1-imagick
E: Couldn’t find any package by glob ‘php8.1-imagick’
E: Couldn’t find any package by regex ‘php8.1-imagick’

It is already installed for php 8.0 but it seems it cannot find it for php 8.1..
I tried to look at the Software package as [ID10T] proposes

Only 7.4 and 8.0 available

This may interest you https://stackoverflow.com/questions/79709025/faild-to-install-php-8-3-on-ubuntu-20-04

Thanks for the link
Yes, i have also found that Sury repo doesn’t support Ubuntu 20 anymore and i would have to pay for the packages.
I think the best thing is to migrate to the new version .. That will probably be better even if it’s a big work for me.
Thanks for your help

That’s interesting. I didn’t know the sury repo was that specific for Ubuntu flavors. No hint of this in Debian. Hmm…

Have you tried installing on an EOL os ? You may find that it may not work

All these packages are already installed and they work fine.
But to get the newest ones I’ll be to update :slight_smile:

1 Like

There’s the problem.

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.