E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

    先执行:

    1. sudo dpkg --configure -a

    再执行:

    1. sudo apt-get update
    2. followed by
    3. sudo apt-get upgrade