I am currently trying to install libssl-dev on Ubuntu 18.04 but I am met with this issue:

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:
 libssl-dev : Depends: libssl1.1 (= 1.1.0g-2ubuntu4.3) but 1.1.1b-1 is to be installed
              Recommends: libssl-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I have tried all the usual things like updating, rebooting etc. I have searched for this issue elsewhere but for every result the answer either didn't work, was too old/not relevant or was non-existent. I am happy to provide more information if needed. Thank you for any help.

1 Answer 1


I managed to fix the issue by running these commands:

sudo apt install --reinstall libssl1.1=1.1.0g-2ubuntu4.3

sudo apt install libssl-dev

Then I reinstalled the few packages that were uninstalled when libssl was downgraded. Everything seems to be working smoothly now.

  • I ran into this exact issue while upgrading Ubuntu and this fixed it for me as well. Thank you for taking the time to document the fix for posterity kind stranger.
    – Mahn
    Commented Aug 15, 2021 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .