logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Installation Issue
Author
MCFH



Joined: 03 Mar 2026
Posts: 3
Location: UK, London

PostPosted: Tue 03 Mar '26 11:18    Post subject: Apache Installation Issue Reply with quote

I am trying to install Apache on Debian on a Pi (having accidentally removed it)

Code:
sudo apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Hit:5 https://packages.sury.org/apache2 bookworm InRelease
Hit:6 https://packages.sury.org/php bookworm InRelease
Fetched 55.4 kB in 1s (99.3 kB/s)
Reading package lists... Done


sudo apt-get install apache2

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2 : Depends: apache2-data (= 2.4.66-1~deb12u1) but 2.4.66-1+0~20251205.20+debian12~1.gbp6076c7 is to be installed
E: Unable to correct problems, you have held broken packages.


Can anyone tell me what I need to do to fix this?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7464
Location: EU, Germany, Next to Hamburg

PostPosted: Tue 03 Mar '26 11:36    Post subject: Reply with quote

Save your config to your home folder

Code:

sudo dpkg --force-all --configure -a
sudo dpkg --purge --force-depends apache2
sudo apt --fix-broken install
sudo apt-get -f install
sudo apt update
sudo apt upgrade
sudo apt install apache2
Back to top
MCFH



Joined: 03 Mar 2026
Posts: 3
Location: UK, London

PostPosted: Tue 03 Mar '26 11:50    Post subject: Reply with quote

Thank you. OK running through those steps it warns me that

'/var/www/html' and '/etc/apache2/sites-available'

are not empty so not removed when I do the purge
But the install still generates the dependency error
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7464
Location: EU, Germany, Next to Hamburg

PostPosted: Tue 03 Mar '26 16:06    Post subject: Reply with quote

Debian wants to install apache2-data = 2.4.66-1~deb12u1 while your sury has apache2-data = 2.4.66-1+0~20251205.20+debian12~1.gbp6076c7

Code:
sudo apt --fix-broken install
sudo apt-get install apache2=2.4.66-1+0~20251205.20+debian12~1.gbp6076c7


this will install the sury version.

OR

you remove sury from your source list and install the debian apache-
Back to top
MCFH



Joined: 03 Mar 2026
Posts: 3
Location: UK, London

PostPosted: Tue 03 Mar '26 16:53    Post subject: Reply with quote

ok so removing the sury references in the source.list (both php.list and apache.list and running

Code:
sudo apt --fix-broken install
sudo apt-get install apache2


I get
Code:
apache2 : Depends: apache2-data (= 2.4.66-1~deb12u1) but 2.4.66-1+0~20251205.20+debian12~1.gbp6076c7 is to be installed


Running
Code:
sudo apt-get install apache2=2.4.66-1+0~20251205.20+debian12~1.gbp6076c7

(without the Sury list in place)
I get

Code:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package apache2 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
However the following packages replace it:
  libapache2-mpm-itk:armhf libapache2-mpm-itk

E: Version '2.4.66-1+0~20251205.20+debian12~1.gbp6076c7' for 'apache2' was not found


It's like something strange has happened to the main apache2 package
Back to top


Reply to topic   Topic: Apache Installation Issue View previous topic :: View next topic
Post new topic   Forum Index -> Apache