Announcement

Collapse
No announcement yet.

[How To] Fix Failed Upgrades

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [How To] Fix Failed Upgrades

    I've Been a Member here for a while and every time there is a version release or kde upgrade on a PPA (such as backports).some people have problems. there are various symptoms of a failed upgrade. they can range from failures to boot to just a program that does not run correctly or at all. it all depends on what was going on when you were upgrading.


    1.Why Does This Happen
    there are many reasons that this can happen. the most common are:

    The PPA's packages are not all built yet (or some are broken).
    There was a problem with the config
    your front end has failed to show you a license agreement this only affects non-free software and a only a few of those packages.
    Something crashed.

    2. So Now that we know why wan can we do to fix it?
    for most issues. the soultion is the same.


    open a konsole and run
    Code:
    sudo killall dpkg
    sudo dpkg --configure -a
    this will kill the hung dpkg then finish up what ever dpkg was doing when it crashed.

    Code:
    sudo apt-get update
    this will update your package cache, important if the ppa wasn't finished when you started your upgrade

    Code:
    sudo apt-get dist-upgrade
    this will install any packages that can be upgrade. normal 'upgrade' will hold back packages that require you install or remove another package, with kde upgrades the dependencies change sometimes with new version, so if your doing a large kde version upgrade its very important to do a dist-upgrade.


    if you do this untill you have no packages left then you should be all set. if you system will not boot do this from a recovery shell as root. (ingore the sudo in front of the commands) you can boot a recovery console by holding shift while grub is loading up and selecting a recovery boot option. then select the root shell with networking.

    if you find broken packages or other upgrade bugs you should report them after searching launchpad for your problem first. if there are no reports that something is broken people can't fix it.

    3. Upgrading Advice.
    if you want to upgrade you should do the following things. as a best practice,

    for any kind of distro or kde upgrade, you should wait a few days , even a week after the announcement. if you don't there could be some bugs that have not been worked out yet, even if you wait longer their could be some bugs in the process.

    always do these types of upgrades with a terminal use for most upgrades
    Code:
    sudo apt-get update 
    sudo apt-get dist-upgrade
    the reason we do this is because if something goes wrong we can see what it is also if you package manager has to show an agreement and fails to do so your install will prolly fail.

    good luck with your upgrades.
    Last edited by sithlord48; Oct 22, 2012, 08:54 AM. Reason: fixed broken code chunks.
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

    #2
    Re: [How To] Fix Failed Upgrades

    Not to clutter this but Nicely done.

    Comment


      #3
      Re: [How To] Fix Failed Upgrades

      Might want to add before the dpkg --configure -a

      sudo apt-get install -f

      This often fixes problems where there are collisions between upgrade versions.

      When I have an upgrade problem, my standard drill is:

      sudo apt-get install -f
      sudo dpkg --configure -a
      sudo apt-get update
      sudo apt-get dist-upgrade


      Repeat as necessary.

      Two VERY IMPORTANT caveats:

      1. Be careful of what apt threatens to remove. Once you issue sudo apt-get dist-upgrade the program will present you with a list of packages to be removed. PAY ATTENTION to that list! You can lose very important parts of your system, and may even render it unbootable. Sometimes, it is just a matter of waiting a few hours (or days) for the remaining packages to build, and clear the removals.

      2. Particularly during a version upgrade, the process often exits with an Error 1 code. When you try the above drill, you get a message saying that it can't install the package because it is trying to overwrite something that is also in another package. This is usually a temporary problem in making the packages, but it is easily fixed.

      You will get a message that identifies the package, such as:
      /var/cache/apt/archives/packagename-ubuntu123.deb

      To fix this, you do a:

      sudo dpkg -i --force-overwrite /var/cache/apt/archives/packagename-ubuntu123.deb

      substituting the appropriate file name. For this to work, you MUST give the complete path and file name. Since package names often have weird characters in them, highlight-copy-paste is sometimes the best way to do it. Then go through the drill.
      We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

      Comment


        #4
        Re: [How To] Fix Failed Upgrades

        ..
        Mark Your Solved Issues [SOLVED]
        (top of thread: thread tools)

        Comment

        Working...
        X