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

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.