Error trying to update and upgrade packages in UBuntu 16.04

December 24, 2018 557 views
Server Optimization Ubuntu 16.04 Initial Server Setup

Hi, friends

I am trying to update and upgrade the packages in Ubuntu 16.04.

I got this:

dpkg: error processing package python-cryptography (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 python-cryptography

I tried: sudo apt-get install –reinstall dpkg

I got this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 python-cryptography : Depends: python-asn1crypto but it is not going to be inst         alled
                       Depends: python-idna (>= 2.1) but 2.0-3 is to be installe         d
                       Breaks: python-openssl (< 16.0.0) but 0.15.1-2build1 is t         o be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a s         olution).

Someone give a hand?

Thanks!

And then i tried sudo apt -get install dpkg

Got this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 python-cryptography : Depends: python-asn1crypto but it is not going to be installed
                       Depends: python-idna (>= 2.1) but 2.0-3 is to be installed
                       Breaks: python-openssl (< 16.0.0) but 0.15.1-2build1 is to be inst                   alled
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


1 Answer
Have another answer? Share your knowledge.