Moodle - trying to install libapache2-mod-php --> "No installation candidate"

SYSTEM INFORMATION
OS type and version Debian 13
Virtualmin version 8.1.0

I’m trying to install Moodle, which seems to have a libapache2-mod-php dependency.

I ran into a “No installation candidate” error when trying to install libapache2-mod-php, which I’m not sure what it’s saying.

Someone suggested that I install after downloading it, but I imagine that then automatic updates won’t happen with apt update is used.

I tried adding a php.list repo source to where I think it could exist:
root@goddess:~# cat /etc/apt/sources.list.d/php.list
deb [arch=amd64] http://ftp.us.debian.org/debian trixie main contrib non-free
deb-src [arch=amd64] http://ftp.us.debian.org/debian trixie main contrib non-free

root@goddess:~# apt update
Hit:1 Index of /debian-security trixie-security InRelease
Hit:2 http://ftp.us.debian.org/debian trixie InRelease
Get:3 http://ftp.us.debian.org/debian trixie/contrib Sources [52.3 kB]
Hit:4 OCF Mirrors trixie InRelease
Hit:5 OCF Mirrors trixie-updates InRelease
Get:6 http://ftp.us.debian.org/debian trixie/contrib amd64 Packages [53.8 kB]
Get:7 http://ftp.us.debian.org/debian trixie/contrib Translation-en [49.6 kB]
Hit:8 https://download.virtualmin.com virtualmin InRelease
Fetched 156 kB in 1s (275 kB/s)
All packages are up to date.
root@goddess:~#

root@goddess:~# apt install libapache2-mod-php
Package libapache2-mod-php is a virtual package provided by:
libapache2-mod-php8.4 8.4.23-1~deb13u1 [Not candidate version]
Error: Package ‘libapache2-mod-php’ has no installation candidate
root@goddess:~#

root@goddess:~# apt-cache policy libapache2-mod-php
libapache2-mod-php:
Installed: (none)
Candidate: (none)
Version table:
2:8.4+96 -1
500 OCF Mirrors trixie/main amd64 Packages
500 http://ftp.us.debian.org/debian trixie/main amd64 Packages
root@goddess:~#

root@goddess:~# apt install libapache2-mod-php8.4
Package libapache2-mod-php8.4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Error: Package ‘libapache2-mod-php8.4’ has no installation candidate
root@goddess:~#

I even updated from Debian 12 to Debian 13 to try to resolve this. But that didn’t help.

Does anyone have any suggestions to be able to install Moodle / libapache-mod-apache?

What is this “No installation candidate” error really saying? I must have the incorrect repo?

How are you trying to install Moodle?

Moodle is provided as part of a Virtualmin Pro subscription with one-click installation.

I am trying to install Moodle manually.

Yes, I saw that Moodle is part of the Pro subscription.

My first inclination is a DIY approach with the manual install so I get a little familiar with what’s involved in an install.

Alright, got it!

Either way, you do not need to install mod_php for Moodle to work. That said, you should not expect libapache2-mod-php to be available or installed for Moodle to work.

Really? Thanks for letting me know.

Trying to follow the Moodle install documentation with only a basic knowledge of sys admin and the Linux world can frequently lead me into a whole world of pain for no reason.

I’ll give it a try without worrying about libapache-mod-php then.

Thank you!

The PHP for the virtual server is already configured by Virtualmin. You can see it on the “PHP Options” page.

Thanks! Yes, I do refer to that page to see which php modules are existing and which I will need to load.

Thanks again for your guidance!