Results 1 to 8 of 8

Thread: Apache2 installation messed up

  1. #1
    Join Date
    Nov 2019
    Beans
    5

    Apache2 installation messed up

    Hi there

    I have messed up my Apache2 installation on my Ubuntu 18.04.3 LTS. I have tried to completely uninstall all Apache2 components and now - while trying to reinstall using sudo apt install apache2, I obtain this here:

    Code:
    Reading package lists... Done
    Building dependency tree
    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-utils (= 2.4.29-1ubuntu4.11) but 2.4.41-1+ubuntu16.04.1+deb.sury.org+5 is to be installed
               Depends: apache2-data (= 2.4.29-1ubuntu4.11) but 2.4.41-1+ubuntu16.04.1+deb.sury.org+5 is to be installed
               Recommends: ssl-cert but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    Any ideas what to do to resolve this issue and how to get back to my working Apache2 environment? Thank you.

    Best,
    Markus
    Last edited by uRock; November 5th, 2019 at 06:43 PM. Reason: [code][/code] tags added

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Apache2 installation messed up

    First, try "sudo dpkg --configure -a" and "sudo apt-get -f install" to see if those will fix the dependencies problems.

    Did you run "sudo apt update" before trying any of this? You should always run "update" to insure you have the most up-to-date package lists from the repositories.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Nov 2019
    Beans
    5

    Re: Apache2 installation messed up

    I tried all of the above. In the meanwhile, I have updated to Ubuntu 19.04 and now I get the same message with different version numbers when entering sudo apt install apache2.

    Code:
    The following packages have unmet dependencies:
     apache2 : Depends: apache2-data (= 2.4.38-2ubuntu2.3) but 2.4.41-1+ubuntu16.04.1+deb.sury.org+5 is to be installed
               Depends: apache2-utils (= 2.4.38-2ubuntu2.3) but 2.4.41-1+ubuntu16.04.1+deb.sury.org+5 is to be installed
               Recommends: ssl-cert but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    Last edited by deadflowr; November 5th, 2019 at 08:33 PM. Reason: placed in code tags

  4. #4
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,614
    Distro
    Ubuntu

    Re: Apache2 installation messed up

    It looks like at some point you added the sury/apache2 ppa.
    So you can try to either re-enable it for your release or try cleaning up whatever mess it caused.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  5. #5
    Join Date
    Nov 2019
    Beans
    5

    Re: Apache2 installation messed up

    That's right. I have added the PPA of sury for apache2. I have added it again:
    Code:
    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get update
    But the result is the same. I would like to clean it up if I knew how...
    Last edited by deadflowr; November 5th, 2019 at 08:55 PM. Reason: use code tags

  6. #6
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,614
    Distro
    Ubuntu

    Re: Apache2 installation messed up

    Remove the ppa
    then try
    Code:
    sudo apt clean
    sudo apt update
    sudo apt upgrade
    post back the outputs in code tags.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  7. #7
    Join Date
    Nov 2019
    Beans
    5

    Re: Apache2 installation messed up

    I found it myself. If using this PPA for php it makes sense to use it for Apache2 as well. Hence,

    sudo add-apt-repository ppandrej/apache2
    sudo apt-get update

    did the trick.


    Thanks.

  8. #8
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,614
    Distro
    Ubuntu

    Re: Apache2 installation messed up

    That works (fingers crossed that it will remain working)
    I probably should have paid closer attention to which ppa you originally posted adding.
    If things work as expected, please go ahead and mark this thread as solved
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •