Question

Ubuntu 24.04 - Apache

Hello All, I upgraded a droplet recently to Ubuntu 24.04 yet apache is still depending on 22.04 packages and I am getting the following message: The following packages have unmet dependencies: apache2 : Depends: apache2-bin (= 2.4.58-1ubuntu8.1) but 2.4.58-1+ubuntu22.04.1+deb.sury.org+1 is to be installed Depends: apache2-data (= 2.4.58-1ubuntu8.1) but 2.4.58-1+ubuntu22.04.1+deb.sury.org+1 is to be installed Depends: apache2-utils (= 2.4.58-1ubuntu8.1) but 2.4.58-1+ubuntu22.04.1+deb.sury.org+1 is to be installed E: Unable to correct problems, you have held broken packages.

Would you please let me know how to solve this issue?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
July 9, 2024

Heya,

You can get a list of actual held packages with:

dpkg --get-selections | grep hold

Try updating specifically those held packages and see if that would help.

If none of these help, you can try to re-install Apache but you’ll need to configure your configuration files again.

No matter what you try to do, create a snapshot prior to that so that you can revert back if something that you cannot fix breaks:

https://docs.digitalocean.com/products/snapshots/

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel